如何使用php运行abc.exe [英] How to run abc.exe using php

查看:76
本文介绍了如何使用php运行abc.exe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望php文件运行exe文件并在用户转到特定URL时显示exe文件的内容.我正在尝试使用php函数exec('abc.exe');运行exe文件.但是我只看到空白页.

I want php file to run exe file and display the exe file content when user goes to a particular url. I am trying to run exe file using php function exec('abc.exe');. But I only see blank page.

有人知道如何解决该问题,或者如何正确地从php文件运行exe文件吗?预先非常感谢.

Anyone know how to solve it or how to run exe file from php file correctly? Many thanks in advance.

推荐答案

要使用php访问操作系统,请执行以下操作

To access the operating system with php you do the following

$answer = shell_exec("abc.exe");
echo $answer."</br>"; 

$ answer字符串将包含abc.exe打印或返回的信息.

The $answer string will contain the information that the abc.exe prints out or returns.

您可能需要使用explode()对其进行格式化.

You may need to format it using explode().

这篇关于如何使用php运行abc.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆