• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page not found but welcome.php works.

Hi guys,

here's the deal.

My CI basically works but I got sorta issue here.

If I go to my http://localhost/cicms/index.php where I have my CodeIgniter it is all good. So, the welcome message is being displayed but if I create my own file and put it in the "controllers" folder and it basically works as well but after the output I create (like echoing or any other output it shows the "page not found" message.

For example if I run this file


echo "ok";


I have the following in my browser:

404 Page Not Found
The page you requested was not found.

I'd really appreciate some help.

Welcome to the forums.

Hopefully you have properly coded your controller to have the proper syntax. You should be able output to the browser from a view or controller without any problem. Do you have any other code in the file?

Also, when posting code, it is helpful if you use the code button in the editor. The code button will highlight the syntax, and not mess up quotes/apostrophe marks.

Yes, your controllers must extend the proper classes in order to be discovered and utilized by CodeIgniter. http://ellislab.com/codeigniter/user-gui...llers.html

Thanks. That did the trick!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.