在 php 中有 shell_exec()
例如,您可以用它在本地服务器上运行程序。但是还有哪些其他基于网络的技术可以做到这一点以及如何做到这一点?
最佳答案
ASP:
set wshell = CreateObject("WScript.Shell")
wshell.run "c:\file.bat"
set wshell = nothing
Python:
from subprocess import call
call(["ls", "-l"])
Perl:
system("command arg1 arg2 arg3");
ruby :
system("ls")
JSP/Servlet:
ProcessBuilder pb =
new ProcessBuilder("/bin/sh", "-c", "myfolder/myscript.sh > /myfolder/logs/myscript.log");
pb.start();
PHP:
shell_exec ( 'command' )
关于php - 还有哪些其他基于网络的技术可以执行程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15121140/