PHP code example of guiguiboy / simple-file-handler
1. Go to this page and download the library: Download guiguiboy/simple-file-handler 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/ */
guiguiboy / simple-file-handler example snippets
$streamHandler = new StreamHandler(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'file.txt');
foreach ($streamHandler->getLines() as $line) {
//Do what you want
}