Friends,
Hi am doing one online shopping project in php. I cant able to run my project . If i run in url index.php is missing so i cant able to run the project(http://localhost:8080/mercigreen/home) . It showing the object not found error. I did my project in code-igniter.I also tried by putting index.php/home in header view page also like that means it is working but if i traverse to another page like about us etc then it showing 2 index.php (http://localhost:8080/mercigreen/index. ... .php/about) so that time it is showing 404 error. Please help me friends.
Thanks in advance.
About the index.php
Moderator: General Moderators
Re: About the index.php
You'll need to be a lot more specific than that. Which version of CI? What specific error messages are you encountering? What does your setup look like (directory structure, etc)?yogeshwari wrote:It showing the object not found error.
-
yogeshwari
- Forum Newbie
- Posts: 4
- Joined: Sat Jan 23, 2016 8:39 am
Re: About the index.php
Why do you have /index.php/index.php ? Is this a legacy project you've inherited or are you starting fresh?
-
yogeshwari
- Forum Newbie
- Posts: 4
- Joined: Sat Jan 23, 2016 8:39 am
Re: About the index.php
In href i gave index.php/home . Am doing project by using free template . am doing for my college academic. so i used free template. if i remove that index.php then also it is not working . If i put that index.php then i can able to load a particular page .
Re: About the index.php
Have you set up any routes? Is anything working? Can you get at least a basic Hello World to behave as expected?
Also, I feel like using something as outdated as CodeIgniter for a brand new project is probably not a great idea.
Also, I feel like using something as outdated as CodeIgniter for a brand new project is probably not a great idea.
-
yogeshwari
- Forum Newbie
- Posts: 4
- Joined: Sat Jan 23, 2016 8:39 am
Re: About the index.php
ya i set routes
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: About the index.php
It looks like the page may have <base> set in the header or CodeIgniter config, so it appending the relative URLS (e.g., "index.php/home") to the base URL. Since there is no Controller "index.php" with Action "home" is gives a error. Changing the URLs to "http://localhost:8080/mercigreen/index.php/home/" or even just "/mercigreen/index.php/home/" should work. You could also set a View variable so you could do: "<?php echo $BASE; ?>/index.php/home/" in your templates.
(#10850)