解决scandir() has been disabled

文章来源:https://jingyan.baidu.com/article/0320e2c1e387601b87507bee.html

解决scandir() has been disabled for security reasons的方法。

今天在折腾yii框架最后提示scandir()函数处于安全原因给关闭了。想必应该是php环境中把scandir写在了disable_functions中。去掉即可。

查看了下phpinfo()果不其然,下面就操作下吧。我的环境是lnmp

 

解决scandir() has been disabled
 
 
  1.  

    查看phpinfo(),确认scandir()函数被禁用

    解决scandir() has been disabled
  2.  

    进入到php的配置目录,编辑php.ini

    cd /usr/local/php/etc

    vi php.ini

    解决scandir() has been disabled
  3.  

    搜索scandir

    然后删掉,保存退出。

    解决scandir() has been disabled
  4.  

    重启nginx和php-fpm。再刷新查看,OK啦!

    解决scandir() has been disabled
posted @ 2017-12-27 10:55  enjie  阅读(304)  评论(0编辑  收藏  举报