lnmp -- 解决Warning: scandir() has been disabled for security reasons in…的问题

原因:LNMP 0.9禁用了部分存在危险的PHP函数

LNMP0.9禁用的PHP函数包括:passthru, exec, system, chroot, scandir, chgrp, chown, shell_exec, proc_open, proc_get_status, ini_alter, ini_alter, ini_restore, dl, pfsockopen ,openlog, syslog, readlink, symlink, popepassthru, stream_socket_server, fsocket, fsockopen

解决方法:
lnmp环境中编辑PHP配置文件:

vi /usr/local/php/etc/php.ini进入编辑状态

输入/,进入搜索模式,找到disable_functions

寻找disable_functions字符串,将后面的scandir删除

重启PHP生效

/etc/init.d/php-fpm restart
--------------------- 
作者:赵公子记 
来源:CSDN 
原文:https://blog.csdn.net/github_36700243/article/details/62430470 
版权声明:本文为博主原创文章,转载请附上博文链接!

猜你喜欢

转载自blog.csdn.net/u012115562/article/details/84327752
今日推荐