| 
 | 
 
 
发表于 2012-2-9 11:25:34
|
显示全部楼层
 
 
 
/syetem/core/CodeIgniter.php 
里面被这样定义了: 
        $class  = $RTR->fetch_class(); 
        $method = $RTR->fetch_method(); 
 
        if ( ! class_exists($class) 
                OR strncmp($method, '_', 1) == 0 
                OR in_array(strtolower($method), array_map('strtolower', get_class_methods('CI_Controller'))) 
                ) 
        { 
                if ( ! empty($RTR->routes['404_override'])) 
                { 
                        $x = explode('/', $RTR->routes['404_override']); 
                        $class = $x[0]; 
                        $method = (isset($x[1]) ? $x[1] : 'index'); 
                        if ( ! class_exists($class)) 
                        { 
                                if ( ! file_exists(APPPATH.'controllers/'.$class.'.php')) 
                                { 
                                        show_404("{$class}/{$method}"); 
                                } 
 
                                include_once(APPPATH.'controllers/'.$class.'.php'); 
                        } 
                } 
                else 
                { 
                        show_404("{$class}/{$method}"); 
                } 
        } 
 
应该是遍历一下class里面有没这个方法,没有就直接404了 
很无耐,但是又不敢改这里 |   
 
 
 
 |