tltemplates/txtfile

A class to help read and write file to txt file faster

1.1.2 2021-03-27 02:55 UTC

This package is auto-updated.

Last update: 2025-05-27 12:06:38 UTC


README

A small PHP library to help read and write data to text file

Usage

Create class to handle a file

//access the file
$file = new TxtFile('text.txt'); 
//access the file and create if it does not exist
$file = new TxtFile('text.txt', true); 

Read content of the file

//store result in an array
$array = $file->readAllAsArray();
//store result in a string
$content = $file->readAllAsString();

Read more on TL Dev Tech