l       linux下 vim /usr/local/php/etc/php.in

l       直接斜杠找 /disable_functions   回车 

l       按i键

l       去掉scandir

l       按Esc,输入wq!  保存回车       q!是不保存退出    lnmp reestart  重启

 

==========================

安装thinkphp时报scandir() has been disabled for security reasons

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

 

解决办法:

 

打开php.ini(路径:/usr/local/php/etc/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禁用了,大家需要的时候去掉就可以了,为了安全尽量少开启!

 

相关文章:

  • 2022-12-23
  • 2021-08-14
  • 2018-02-18
  • 2021-09-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
相关资源
相似解决方案