Recommend this page to a friend! |
Download .zip |
Info | View files (3) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-04-04 (11 days ago) | Not yet rated by the users | Total: 70 This week: 11 | All time: 9,960 This week: 12 |
Version | License | PHP version | Categories | |||
write 1.0.0 | GNU General Publi... | 5 | PHP 5, Files and Folders |
Description | Author | ||||||||||||||
This class can write an array or text to a file creating its folder. |
|
It is used to write the specified content to the specified file. It is created if the file and directory in question does not exist, returning true if the operation was successful, false otherwise. takes three parameters;
First parameter:
It represents the content and can be sent as string
or array
. If sent as an array, the array elements are written to the file as string
by adding the :
symbol between them.
Second parameter:
It represents the file path, if there is a file, the data in question is appended to the end of the file, if there is no file, a file with the specified name in the path is created and written to this file.
Third parameter:
Represents the value to be used to separate data specified as an array. It is not required to be specified, by default :
is defined.
data:
$str = 'Hello world';
// $str = array('Hello', 'world');
Out-of-class use:
code:
require_once('Mind.php');
$m = new Mind();
echo $m::aliyilmaz('write')->write($str, 'new.txt');
// echo $m::aliyilmaz('write')->write($str, 'new.txt', '~');
When using it in the class:
code:
echo self::aliyilmaz('write')->write($str, 'new.txt');
// echo self::aliyilmaz('write')->write($str, 'new.txt', '~');
output:
Hello world
Instructions and files in this directory are shared under the GPL3 license.
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.