企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
~~~ shell_exec() has been disabled for security reasons 打开php.ini,搜索disable_functions,代码如下: 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 把shell_exec删除即可,保存。 ~~~ ~~~ nohup php monitor.php > ./a.txt & 后台持续开启执行 monitor.php ps -aux|grep monitor.php | grep -v grep | awk '{print $2}' 关闭后台进程 ~~~ ~~~ ## 1、允许单个域名访问 指定某域名(http://client.runoob.com)跨域访问,则只需在http://server.runoob.com/server.php文件头部添加如下代码: ~~~ header('Access-Control-Allow-Origin:http://client.runoob.com'); ~~~ ## 2、允许多个域名访问 指定多个域名(http://client1.runoob.com、http://client2.runoob.com等)跨域访问,则只需在http://server.runoob.com/server.php文件头部添加如下代码: ~~~ $origin = isset($_SERVER['HTTP_ORIGIN'])? $_SERVER['HTTP_ORIGIN'] : ''; $allow_origin = array( 'http://client1.runoob.com', 'http://client2.runoob.com' ); if(in_array($origin, $allow_origin)){ header('Access-Control-Allow-Origin:'.$origin); } ~~~ ## 3、允许所有域名访问 允许所有域名访问则只需在http://server.runoob.com/server.php文件头部添加如下代码: ~~~ header('Access-Control-Allow-Origin:*'); ~~~ ~~~