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

从github下载三方扩展后直接拖拽至vendor目录
运行项目报错 报scandir() has been disabled for security reasons

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

 

 

 

原因:
因为PHP里面的scandir函数被禁用了


打开php.ini

disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,

proc_get_statu,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,

readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen


解决:
去掉scandir保存并重起php-fpm即可。

很多函数问题,都有可能是php禁用了,大家需要的时候去掉就可以了,为了安全尽量少开启!

 

by:ph

上一篇:Project facet jst.web.jstl has not been defined.


下一篇:JZOJ.2020.05.23【NOIP提高组】模拟(反思)