Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/282.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从php执行.exe文件_Php_Exec - Fatal编程技术网

从php执行.exe文件

从php执行.exe文件,php,exec,Php,Exec,我写了这个程序: echo exec('hi.exe '.$file,$results,$status); if ($status === 0) { echo implode('<br/><br/>',$results); } echo exec('hi.exe'.$file,$results,$status); 如果($status==0) { 回波内爆(“”,$results); } hi.exe正在生成同一目录中相应文件中的所有输出(.e

我写了这个程序:

echo exec('hi.exe '.$file,$results,$status);
if ($status === 0)
{
    echo implode('<br/><br/>',$results);
}    
echo exec('hi.exe'.$file,$results,$status);
如果($status==0)
{
回波内爆(“

”,$results); }
hi.exe正在生成同一目录中相应文件中的所有输出(.exe文件工作正常),但问题是,每当我在浏览器中从localhost运行此.exe文件时,浏览器会继续加载,并且不会显示任何输出


为什么会这样?为什么浏览器变得这么慢

您的服务器是否有权运行该文件?hi.exe是否有可能陷入无限循环?是的,它有。。。因为程序正在执行,并且正在后端生成相应的文件。但是在前端它没有显示输出我们怎么能检查@Hernan?我如何才能阻止这个hi.exe不陷入无限循环?有什么建议吗?