Last active
April 27, 2020 05:00
-
-
Save vidux/ded7004a9c2b0cc308a50ca38a354e65 to your computer and use it in GitHub Desktop.
php/laravel read tail log file from code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$file = popen("tail /storge/logs/laravel.log", 'r'); | |
while(!feof($file)) { | |
$buffer = fgets($file); | |
echo "$buffer<br/>\n"; | |
ob_flush(); | |
flush(); | |
} | |
pclose($file); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment