class Server
{const PORT = 8811;public function port(){//运行中返回1 没有返回0$shell = "netstat -anp tcp| grep ". self::PORT ." |grep LISTEN | wc -l";$result = shell_exec($shell);if($result ==0){echo "error";}else{echo "success";}}
}
(new Server())->port();
详细解决方案
监控服务
热度:23 发布时间:2024-03-08 12:19:03.0
相关解决方案