php 解决file_put_contents 不生效

define('FILE_APPEND', 1); 

if (!function_exists("file_put_contents")) { 

    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;
}
} }
上一篇:vs2010 opencv2.4.10 配置过程出现的问题 & mfc打开图片


下一篇:codeforces C1. The Great Julya Calendar 解题报告