简体   繁体   English

如何从PHP运行过程

[英]How do I run a process from PHP

I need to start a Unix process by calling a PHP-page through the web. 我需要通过网络调用PHP页面来启动Unix进程。 I also need to send some arguments to the PHP-page that gets substituted into the command in a save way. 我还需要发送一些参数到PHP页面,该页面以保存的方式替换到命令中。

看一下exec()escapeshellarg()

exec('command -param=' . escapeshellarg($_GET['argument']));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM