Monday, July 23, 2007

File Handling - Write to File

function to write a string to a file
function file_write($filename, $filecontent)
{
if($fp = @fopen($filename,"w"))
{
$contents = fwrite($fp, $filecontent, 80000);
fclose($fp);
return true;
}else{
return false;
}
}
?>

No comments: