Welcome Guest, Not a member yet? Register   Sign In
Bug with controller name
#1

[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
#2

[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)?
#3

[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.




Theme © iAndrew 2016 - Forum software by © MyBB