<?php
$handle = popen("tail -f /var/log/nginx/access.log 2>&1", 'r');
while(!feof($handle)) {
$buffer = fgets($handle);
echo "$buffer\n";
flush();
}
pclose($handle);
php 模拟 tail -f
最新推荐文章于 2023-06-11 18:13:35 发布