解决报错:scandir() has been disabled for security reasons

Posted 依然范儿特西

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决报错:scandir() has been disabled for security reasons相关的知识,希望对你有一定的参考价值。

服务器环境: LNMP

在服务器部署代码时候。遇到了这个问题。 蛋疼啊!

 

2 解决办法:  打开phpinfo.php , 搜索: scandir 找到disabled_function,确认此函数未开启

 

3  打开文件: /usr/local/php/etc/php.ini

   删除  scandir,     保存 

 

4  重启,网上说重启fpm什么的。。我试了下没成功。。

   直接进入服务器后台,重启服务器,简单粗暴

5  打开测试。成功

   

 

以上是关于解决报错:scandir() has been disabled for security reasons的主要内容,如果未能解决你的问题,请参考以下文章

运行项目报错 报scandir() has been disabled for security reasons

scandir() ,stream_socket_server() has been disabled for security reasons解决方法

微信小程序 uniapp has not been registered yet.报错 解决方案

Idea打开之后报错:The liscense XXX has been cancelled如何解决?

Java Web报错:getOutputStream() has already been called for this response解决方案

React Native出错:Application XXX has not been registered解决方案