上一个项目在api上使用了thinkphp5.1,但是后台还是使用thinkcmf5.0,tp版本是5.0 .当时就想统一thinkphp版本。最近得空有时间修改,因此在ThinkCMF 5.0.180901基础上将thinkphp版本改成5.1.29 。修改后,已经对本地测试的不兼容进行修改。
ThinkCMF 5.0.180901 正式版
thinkphp5.1.29
self::$composerPath = $rootPath . 'vendor' . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR;
self::addAutoLoadDir($rootPath . 'extend');
__CAPTCHA_SRC=url('/newcaptcha/admin')
修改获取验证码路由。路由配置在cmf/common.php文件中定义。避免走默认的验证码控制器。$param = 'null';//'$temp' . uniqid();
避免没有参数的hook错误php ('field'=>['in',$data])
而是使用'field'=>$data