Welcome Guest, Not a member yet? Register   Sign In
"Json" as controller name does not work

(This post was last modified: 10-27-2019, 01:44 PM by HarrysR.)

Well i've faced a very weird issue.

If i create a controller named "Json" and try to access it i get an "Object not found" error in my CI project. On the other hand if i give the controller another name it'll work like a charm or if i use an Uppercase first letter it will also work.

Here's my controller, filename and routes files.

PHP Code:
('BASEPATH') OR exit('No direct script access allowed');

Json extends CI_Controller {
 public function 
// Some code

PHP Code:
$route['(?i)json']              'json';
$route['(?i)json/(:any)']       'json/$1'

Any ideas?

//Life motto
if (sad() == true) {

Messages In This Thread
"Json" as controller name does not work - by HarrysR - 10-27-2019, 01:43 PM

Theme © iAndrew 2016 - Forum software by © MyBB