dev-master
9999999-devFile
MIT
The Requires
by hrupin
extension yii2
File
File, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist hrupin/yii2-file "*"
or add, (*4)
"hrupin/yii2-file": "*"
to the require section of your composer.json
file., (*5)
Once the extension is installed, simply use it in your code by :, (*6)
use hrupin\file\File; $dir = '/some/your/dir'; $file = new File($dir, 'file.txt'); $file->readAllFile(); $file->readStrFile(10); $file->closeFile(); $file->createFile($dir, 'anotherFile.txt'); $file->writeFile('You some text or data ...'); $file->writeFile('Add you some text or data ...'); $file->readAllFile(); $file->closeFile(); var_dump($file->getErrors());
File
MIT
extension yii2