Welcome Guest, Not a member yet? Register   Sign In
problem of link [solved problem]
#1

(This post was last modified: 11-17-2016, 01:48 AM by alf78fr.)

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
French citizen (please excuse me for my english Confused )
Having a good knowledge of the PHP but novice with CodeIgniter
I use CodeIgniter 3



Reply


Messages In This Thread
problem of link [solved problem] - by alf78fr - 11-11-2016, 09:06 AM
RE: problem of link - by Gustavo Martins - 11-11-2016, 11:20 AM
RE: problem of link - by dave friend - 11-11-2016, 11:37 AM
RE: problem of link - by Wouter60 - 11-11-2016, 11:40 AM
RE: problem of link - by alf78fr - 11-12-2016, 08:32 AM
RE: problem of link - by alf78fr - 11-12-2016, 08:51 AM
RE: problem of link - by dave friend - 11-12-2016, 09:34 AM
RE: problem of link - by alf78fr - 11-12-2016, 11:59 AM
RE: problem of link - by dave friend - 11-12-2016, 01:47 PM
RE: problem of link - by alf78fr - 11-13-2016, 08:03 AM
RE: problem of link - by dave friend - 11-13-2016, 08:33 AM
RE: problem of link - by alf78fr - 11-14-2016, 11:30 AM
RE: problem of link - by dave friend - 11-14-2016, 12:32 PM
RE: problem of link - by Wouter60 - 11-14-2016, 12:36 PM
RE: problem of link - by alf78fr - 11-14-2016, 02:11 PM
RE: problem of link [solved problem] - by alf78fr - 11-17-2016, 01:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB