All pastes #804962 Raw Edit

Something

public php v1 · immutable
·published 2007-12-03 22:42 UTC
rendered paste body
define('FILE_APPEND', 1);function file_put_contents($n, $d, $flag = false) {    $mode = ($flag == FILE_APPEND || strtoupper($flag) == 'FILE_APPEND') ? 'a' : 'w';    $f = @fopen($n, $mode);    if ($f === false) {        return 0;    } else {        if (is_array($d)) $d = implode($d);        $bytes_written = fwrite($f, $d);        fclose($f);        return $bytes_written;    }}