• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Json" as controller name does not work

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

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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