exec("pgrep lighttpd", $pids);
if(empty($pids)) {
// lighttpd is not running!
}
pgrep -f 全名匹配.
$mabbitmq=shell_exec("pgrep [r]abbitmq"); //https://stackoverflow.com/questions/51551908/why-is-the-result-equal-to-0-and-sometimes-1-shell-execpgrep-f
$mabbitmq = str_replace(PHP_EOL, '', $mabbitmq);
$mongodb=shell_exec("pgrep [m]ongo");
$mongodb = str_replace(PHP_EOL, '', $mongodb);
$ydmcuclient=shell_exec("pgrep -f [y]dmcu_client");
$ydmcuclient = str_replace(PHP_EOL, '', $ydmcuclient);
: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in
评论 (0)