php调用外部exe程序,该如何解决
Jun 13, 2016 pm 12:54 PM
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");
test.exe 与文件同一级,不同级请带上目录
刚刚我自己写了个简单的test.exe输出,测试有返回,你试试看
------解决方案--------------------
你先找一个有返回信息的exe测试,pncc这个是啥东西我不太了解,你用dir之类测试一下吧
另外,有些要调用系统权属的外部文件的是不能运行的,你想想php弄个命令去改注册表可行么?

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

Huawei Watch GT 5 smartwatch gets update with new features

How To Set Up Visual Studio Code (VS Code) for PHP Development

How do you parse and process HTML/XML in PHP?

PHP Program to Count Vowels in a String

New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives

7 PHP Functions I Regret I Didn't Know Before

Top 10 PHP CMS Platforms For Developers in 2024
