PHP code example of jimenezmaximiliano / php-tail-file

1. Go to this page and download the library: Download jimenezmaximiliano/php-tail-file library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jimenezmaximiliano / php-tail-file example snippets


$numberOfLines = 2;
$filePath = realpath("file.log");

$lines = Tail::tail($filePath, $numberOfLines);

// ["line 30", "line 31"]
bash
composer