creating a HTML file and using fputs/fwrite
Posted: Tue Apr 08, 2003 6:50 am
Hi
What I am trying to do is write a script that creates a HTML file. The following code creates the file but I am having a problem putting the content in as it gives me this error
i have also tried fputs, any ideas anyone.
Thanks
Deej
What I am trying to do is write a script that creates a HTML file. The following code creates the file but I am having a problem putting the content in as it gives me this error
the code isWarning: fwrite(): supplied argument is not a valid File-Handle resource in /php/creatingHTMLoutput.php on line 123
Code: Select all
<?php
function create_file($file){
$fp = fopen($file, "a");//open file
fwrite($file, "$Content");
fclose($fp);//close file
}//close function
?>Thanks
Deej