[英]exec not working in php script ( WAMP Server )
我在我的系统上使用WAMP服务器来执行php脚本。
我想从我的主脚本main.php
执行脚本test.php
。
为此,我使用exec
函数,如这个exec('php test.php');
。 在test.php
我给出了一个echo
语句。
但是当我从浏览器运行我的main.php
脚本时,我无法看到test.php
脚本的输出。
我究竟做错了什么 ? 请建议。
你必须给出正确的php.exe
路径
exec("c:\wamp\<where ever you exe is>/php.exe test.php");
所以它必须是一条正确的道路
使用此命令
echo exec('php test.php', $output); //this will print your echo statement.
print_r($output);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.