RE: [PHP] fwrite() - problems....

From: Date: Mon, 08 Apr 2002 17:51:55 +0000
Subject: RE: [PHP] fwrite() - problems....
Groups: php.general 
Request: Send a blank email to php-general+get-92096@lists.php.net to get a copy of this message
$fp = fopen($filename, "w"); fwrite($fp, $outputstring); READ THE DOCS -----Original Message----- From: Phil Schwarzmann [mailto:pschwar@jhmi.edu] Sent: Monday, April 08, 2002 12:51 PM To: php-general@lists.php.net Subject: [PHP] fwrite() - problems.... I have a large string that I want to written to a new file. Let's say the string contains the characters, "hello!" and I want the filename to be "hello.txt" Here is the code I have... $filename = "hello.txt"; $outputstring = "hello"; fwrite($filename, $outputstring); ...and of course it isn't working. I get this error... Warning: Supplied argument is not a valid File-Handle resource in /home/filanya/www/biopsy/export.php What am I doing wrong? ThANKS!!

« previous php.general (#92096) next »