CodeIgniter Forums

Full Version: Page not found but welcome.php works.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

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.

El Forum

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.

El Forum

Yes, your controllers must extend the proper classes in order to be discovered and utilized by CodeIgniter.

El Forum

Thanks. That did the trick!