开发者

exec() command from web server in php

开发者 https://www.devze.com 2022-12-23 16:08 出处:网络
Is there anyway to us开发者_开发问答e atrm command to remove queue job from PHP web application?

Is there anyway to us开发者_开发问答e atrm command to remove queue job from PHP web application? I wrote a shell script to remove the queue job but it doesn't work well.

#! /bin/sh

export PATH=/usr/local/bin:$PATH

echo atrm 3700 2>&1


You can try doing:

echo exec('export PATH=/usr/local/bin:$PATH ; atrm 3700 2>&1');


Try atrm 3700 2 > &1 without echo


You can use shell_exec or exec PHP function :

$output=shell_exec($commandstring);
print_r($output);

or

 exec($commandstring,$output,$returnval);
 print_r($output);
 print_r($returnval);
0

精彩评论

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