PHP调用函数:passthru()被禁用 解决方法

这是一个PHP搭的微信小程序的后台,但是,我启动的时候提示如下错误:

In ServerCommand.php line 39:

passthru() has been disabled for security reasons

中文翻译

在ServerCommand.php中,第39行:

出于安全原因已禁用passthru()

passthru() has been disabled for security reasons

 

解决方法

passthru()被禁用,解决方法也很简单,只需要修改PHP配置php.ini文件:

 

将:

disable_functions = scandir,passthru,exec,system,chroot,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

 

删除掉passthru,保存并重起php-fpm即可!

 

注意:

一般情况下来说,Linux下的 php.ini 的位置:/usr/local/php/etc/php.ini 。

    A+
发布日期:2019年11月29日 17:06:58  所属分类:PHP
最后更新时间:2019-11-29 17:07:52
付杰
  • ¥ 79.0元
  • 市场价:99.0元
  • ¥ 79.0元
  • 市场价:99.0元
  • ¥ 99.9元
  • 市场价:299元
  • ¥ 15元
  • 市场价:15元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: