Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14115

problem of link

$
0
0
Hello
here my difficulty:
I want to establish a link towards another view with this code:

PHP Code:
<H2 class="centrage"><A href="<?php echo site_url('Curriculum'); ?>">Contactez moi !</A></H2

I have an error 404

here the file //controllers/Homepage.php ( principal controller)
PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

class 
Homepage extends CI_Controller {

 
   public function index()
 
   {
 
       $data['title']= 'Accueil';

 
       $this->load->view('Connon/Header.php',$data);
 
       $this->load->view('Connon/Menu.php');
 
       $this->load->view('Site/Accueil.php');
 
       $this->load->view('Connon/Footer.php');
 
   }

 
   public function curriculum()
 
   {
 
       $data['title']= 'Curriculum';
 
       $this->load->view('Connon/Header.php',$data);
 
       $this->load->view('Connon/Menu.php');
 
       $this->load->view('Site/Curriculum.php');
 
       $this->load->view('Connon/Footer.php');
 
   }




and here the file /config/config.php


PHP Code:
<?php
defined
('BASEPATH') OR exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|    http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
$root "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

//$config['base_url']    = "$root";
$config['base_url'   "http://127.0.0.1/codeigniter";

/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';

/* 

I use codeigniter 3

thank you for your assistance

Viewing all articles
Browse latest Browse all 14115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>