PHP code example of michaeldrennen / local-file

1. Go to this page and download the library: Download michaeldrennen/local-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/ */

    

michaeldrennen / local-file example snippets


use MichaelDrennen\LocalFile\LocalFile;

$lineCount = LocalFile::lineCount('/path/to/your/file.txt);
echo $lineCount;

use MichaelDrennen\LocalFile\LocalFile;

$splitFilePaths = LocalFile::split('/path/to/your/file.txt);
print_r($splitFilePaths);