問題一:這種情況剛開始會報錯:
Uncaught think\exception\ErrorException: scandir() has been disabled for security reasons in /home/w********
此處報錯爲找不到scandir()這個方法
LNMP一鍵包爲了安全考慮,默認禁用了scandir函數
解決方法:修改/usr/local/php/etc/php.ini 查找disable_functions 將後面的scandir刪掉,保存,然後執行:/etc/init.d/php-fpm restart 重啓後即可。
問題二:url中改變路由,他的輸出內容不變
檢測方式:可以在thinkphp中的library下的think下的App.php中的routeCheck方法中echo $path;
解決方案:
改library下的think下的request.php中的path方法和pathinfo方法,避掉兩者的限制條件is_null