<?php $rows = 40; echo "<pre>"; $log = '/var/log/smartHome/smart.log'; system("tail -". $rows ." '$log' | tac"); echo "</pre>"; ?>