在LNMP服务器环境部署代码时候。遇到了“scandir() has been disabled for security reasons”这个问题。 效果如下图:
scandir() has been disabled for security reasons
中文翻译
scandir()已经出于安全原因关闭
解决办法如下:
1、打开phpinfo.php , 搜索: scandir 找到disabled_function,确认此函数未开启
2、 打开文件: /usr/local/php/etc/php.ini ,输入/,进入搜索模式,
找到 disable_functions,寻找disable_functions字符串,将后面的 scandir 删除,保存并退出;
3、重启php(先杀掉php-fpm进程再重启php)
2018年03月20日 13:00:08 沙发
我也是出现:
// 读取扩展配置文件 scandir() has been disabled for security reasons
2018年02月23日 14:40:10 板凳
今天我安装tp也遇到了这个问题:
如下: