php5已经包含了file_pub_contents函数,这个可以用在php4中
if (!function_exists('file_put_contents')) {
function file_put_contents($file, $contents = '', $method = 'a+') {
$file_handle = fopen($file, $method);
fwrite($file_handle, $contents);
fclose($file_handle);
return true;
}
}
