PHP code example of php-component / atomic-file

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

    

php-component / atomic-file example snippets


$file_path = dirname(__FILE__).'/../tmp/test.txt';
$reader = new PHPComponent\AtomicFile\AtomicFileReader($file_path); //create instance of Reader
print_r($reader->readFile()); //read file