File::append PHP Method

append() public static method

Append to a file.
public static append ( string $path, string $data ) : integer
$path string
$data string
return integer
        public static function append($path, $data)
        {
            return \Illuminate\Filesystem\Filesystem::append($path, $data);
        }

Usage Example

Example #1
0
function w_serverlog($server, $log)
{
    $logfile = TMP . "server/" . $server . ".log";
    $file = new File($logfile);
    if ($file->exists()) {
        $file->append('
[' . date('Y-m-d H:i:s') . '] ' . $log);
    } else {
        $file->create();
        $file->append('[' . date('Y-m-d H:i:s') . '] ' . $log);
    }
}
All Usage Examples Of File::append