'AUTOLOAD_NAMESPACE' => array(
'Lib' => COMMON_PATH.'Lib',
)./Application/Common/Lib/My/CommonController.class.php内容如下:<?php
namespace Lib\My;
use Think\Controller;
class CommonController extends Controller {
public function _initialize(){
echo '成功!';
}
}模块中IndexController.class.php文件如下:<?php
namespace XXX\Controller;
use Lib\My\CommonController;
class IndexController extends CommonController {
public function index(){
$this->display();
}
}报错如下:Error:Class 'Lib\My\CommonController' not found in .../XXX/Controller/IndexController.class.php on line 4
折腾了几天了,还是这样,到底什么原因
最佳答案