开发者

Execute a Application On The Server Using PHP(With safe_mode enabled)

开发者 https://www.devze.com 2022-12-29 15:07 出处:网络
I have an application on my server that is called leaf.exe, that haves two arguments needed to run, they are: inputfile and outputfile, that will be like this example:

I have an application on my server that is called leaf.exe, that haves two arguments needed to run, they are: inputfile and outputfile, that will be like this example:

pnote.exe input.pnt output.txt

The executable is at exec/, inputfile is at upload/ and outputfile is on compiled/. But I need that a PHP could run the application like that, then I want to know:

  • How could I do this on a server that have exec() disabled and I can't turn it on, because I don开发者_如何学Python't have privileges to do it?
  • How could I echo the output of the program?


The exec function is probably what you're looking for: PHP: exec - Manual


There are a fair amount of ways to do this. It partly depends on how your executables act and what they return. Have a look at System Program Execution. Hober suggests exec(), and that may be right. Another possibility may be passthru()

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号