this worked for me! // PHP_VERSION < "5.0.0"
if(!function_exists('file_put_contents')) {
$file_put_contents = '
function file_put_contents($filename, $data, $flags=0, $zcontext=null)
{
if($zcontext)
$fp = @fopen($filename, "w+b", $flags, $zcontext);
else
$fp = @fopen($filename, "w+b", $flags);
if(!$fp)
return FALSE;
fwrite($fp, $data);
fclose($fp);
return strlen($data); // std ret-val of func
} ';
eval($file_put_contents);
}
--Hans 07:36, 25 March 2006 (EST)