Home > Backend Development > PHP Tutorial > php调用外部exe程序,该如何解决

php调用外部exe程序,该如何解决

WBOY
Release: 2016-06-13 12:54:16
Original
1307 people have browsed it

php调用外部exe程序
我现在用php调用外部的exe程序 或者.bat文件没有反应,也不知道问题出在哪

$flv_cmd="D:\\wamp\\www\\infoLib\\rerere\\PNCC.exe";
exec($flv_cmd);
?>

类似这样的 ,用system我也试过,求解惑,求解答。


------解决方案--------------------
$dir = dirname(__FILE__);<br />
system($dir."/test.exe");
Copy after login

test.exe 与文件同一级,不同级请带上目录
刚刚我自己写了个简单的test.exe输出,测试有返回,你试试看
------解决方案--------------------
你先找一个有返回信息的exe测试,pncc这个是啥东西我不太了解,你用dir之类测试一下吧

另外,有些要调用系统权属的外部文件的是不能运行的,你想想php弄个命令去改注册表可行么?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template