PHP implements tail command

WBOY
Release: 2016-07-25 08:41:54
Original
1513 people have browsed it
[PHP] Code
  1. $handle = popen("tail -f /var/log/your_file.log 2>&1", 'r');
  2. while(!feof($handle)) {
  3. $buffer = fgets($handle);
  4. echo "$buffern";
  5. flush();
  6. }
  7. pclose($handle);
Copy code
php, tail


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template