Home > Article > Backend Development > CI 3.0 default route is placed in a subfolder and is inaccessible.
// if (sscanf($this->default_controller, '%[^/]/%s', $class, $method) !== 2)
// {
Then add the following code at the end:
'/');
// Record the subscript of the symbol '/'($index == false) ## $this->default_controller;
// Without '/' you can assign the value directly# }else{
$this->default_controller, 0, $index + 1); //Directory string
# ->default_controller, $index + 1); //Class string
## } ##
#This solves the problem that the default route cannot be found in a subfolder.
The above is the detailed content of CI 3.0 default route is placed in a subfolder and is inaccessible.. For more information, please follow other related articles on the PHP Chinese website!