外部进程的Php检查
我正在尝试向我的网站添加一些php,以完成以下任务:外部进程的Php检查,php,exe,external,Php,Exe,External,我正在尝试向我的网站添加一些php,以完成以下任务: check if foo.exe is running if foo.exe is running display run.png else display not.png check if bar.exe is running if foo.exe is running display run.png else display not.png 我遇到的问题是,我在网上找到的任何东西都无法告诉我应该研究什么方法。我花了数周的时间在Code
check if foo.exe is running
if foo.exe is running display run.png
else display not.png
check if bar.exe is running
if foo.exe is running display run.png
else display not.png
我遇到的问题是,我在网上找到的任何东西都无法告诉我应该研究什么方法。我花了数周的时间在Codecademy、w3schools等网站上学习PHP,没有一个网站能给我一点关于如何实现这一点的线索。好的,所以我所做的(感谢建议)是:
<?php
$output = shell_exec('wmic process list brief | find /i "ventrilo_srv.exe"');
echo $output;
?>
听起来像是exec
和系统车载工具的工作^是的操作系统工具,当然取决于操作系统