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

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

Jun 13, 2016 pm 12:54 PM
exe nbsp php system test

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弄个命令去改注册表可行么?
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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian

Huawei Watch GT 5 smartwatch gets update with new features Huawei Watch GT 5 smartwatch gets update with new features Oct 03, 2024 am 06:25 AM

Huawei Watch GT 5 smartwatch gets update with new features

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

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

How do you parse and process HTML/XML in PHP? How do you parse and process HTML/XML in PHP? Feb 07, 2025 am 11:57 AM

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

PHP Program to Count Vowels in a String PHP Program to Count Vowels in a String Feb 07, 2025 pm 12:12 PM

PHP Program to Count Vowels in a String

New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives Oct 02, 2024 pm 09:02 PM

New Xiaomi Mijia Graphene Oil Heater with HyperOS arrives

7 PHP Functions I Regret I Didn't Know Before 7 PHP Functions I Regret I Didn't Know Before Nov 13, 2024 am 09:42 AM

7 PHP Functions I Regret I Didn't Know Before

Top 10 PHP CMS Platforms For Developers in 2024 Top 10 PHP CMS Platforms For Developers in 2024 Dec 05, 2024 am 10:29 AM

Top 10 PHP CMS Platforms For Developers in 2024

See all articles