0

Hi all,

I use codeiniter framework and I am still new to the framework.

I settup a project in a localhost in my pc and I use netbeans id.

I setup route.php in config folder , as $route = "welcome";

when the project is started it shows the url as follows.
http://localhost/projectname/index.php

index method in the welcome controle is as follows.

public function index()
	{
            $data['main_content']='home';
            		//$config['base_url'] = base_url() .'/home/index/';	
		$this->load->view('layout',$data);
                
	}

i have another method temp in welcome controller

<div id="te_menu"> 
            <ul> 
                <li><a href="<?= base_url().'home/index' ?>" class="current">Home</a></li> 
                <li><a href="<?= base_url().'welcome/temp' ?>" target="_parent">Templates</a></li> 
                <li><a href="#">Services</a></li> 
           
                <li><a href="#">About</a></li> 
                <li><a href="#">Contact</a></li> .


            </ul> 
		</div> <!-- end of menu --> 
    
    </div> <!-- end of banner -->

but when I click on the templates tab it shows the url as http://localhost/charitha/welcome/temp and gives error 404

but if I change it to http://localhost/charitha/index.php/welcome/temp

how to set index.php part by default or rename it. if I want it thanks.

plz help me

sory here is the correct code for the view

<div id="te_menu"> 
            <ul> 
                <li><a href="<?= base_url().'welcome/index' ?>" class="current">Home</a></li> 
                <li><a href="<?= base_url().'welcome/temp' ?>" target="_parent">Templates</a></li> 
                <li><a href="#">Services</a></li> 
           
                <li><a href="#">About</a></li> 
                <li><a href="#">Contact</a></li> .


            </ul> 
		</div> <!-- end of menu --> 
    
    </div> <!-- end of banner -->

plz help thx

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by deceptikon
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.