CodeIgniter Forums
Bug with controller name - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Bug with controller name (/showthread.php?tid=52888)



Bug with controller name - El Forum - 07-01-2012

[eluser]Unknown[/eluser]
I had controller named "publications.php". Now I will show you its elementary code.
Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Publications extends CI_Controller {
    
    function view(){
        echo 1;
    }    

}
When open http://sitename/publications/view it showed me that no such URL found (Denwer error page).
I just renamed the controller to "publish.php" and it worked.
Code:
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Publish extends CI_Controller {
    
    function view(){
        echo 1;
    }    

}
Why it is so? Why I can't use publications name?
Version of my CI 2.1.0


Bug with controller name - El Forum - 07-01-2012

[eluser]WanWizard[/eluser]
Works fine here, so whatever your issue is, this isn't it.

No other things interfering with this request, like routes? And what error page do you exactly get (don't know what Denwer is)?


Bug with controller name - El Forum - 07-01-2012

[eluser]Unknown[/eluser]
No, there is nothing that can interfere it. Routes are default. I thought maybe there is some restrictions with controller name. Did you try it on yourself? Can you create controller with "publications" name or it happens only with me?
Denwer is a local server. On remote server it shows 404 page. No php errors are shown.