Re: fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14

From: Date: Mon, 16 Apr 2001 17:24:07 +0000
Subject: Re: fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-48871@lists.php.net to get a copy of this message
alright try removing the byte length identifier ----- Original Message ----- From: "Chris Anderson" <chrisderson@ameritech.net> To: <cczona@nospam.invalid>; <php-general@lists.php.net> Sent: Monday, April 16, 2001 1:20 PM Subject: Re: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, Apache/1.3.14 > come to think of it, why are you passing 3 arguements to fwrite()? > ----- Original Message ----- > From: "CC Zona" <cczona@nospam.invalid> > To: <php-general@lists.php.net> > Sent: Monday, April 16, 2001 5:34 PM > Subject: [PHP] fwrite not writing (simpler example), PHP 4.0.4pl1, > Apache/1.3.14 > > > > Suggestions so far have focused on parts of the function other than > fwrite, > > so I'm trying again with a stripped-down example. After spending many > > hours trying to make this very simple function work again, I'm beginning > to > > think fwrite in broken--either in 4.0.4pl1 (?!) or in my build of it (it > > was working fine before...). Before filing a bug report, would a few > > people test whether this fails to write on their system too? Thank you! > > > > > > function build_file() > > { > > $fp=fopen("/path/to/directory/test.inc","w") or die("ERROR on > > fopen" . > > $php_errormsg); > > fwrite($fp,"<p>Hi, I'm some test content</p>",100000000) or die("ERROR: > > fwrite " . $php_errormsg); > > fclose($fp) or die("ERROR: fclose" . $php_errormsg); > > } > > > > build_file(); //no errors and file modification date is updated > > > > echo "<p>Begin include...<p>"; //ok > > include("/path/to/directory/test.inc"); //NOTHING! > > echo "<p>...End include<p>"; //ok > > > > (Checking from the commandline, the file is definitely being set to empty. > > It's writing an empty string to the file instead of writing the specified > > content.) > > > > -- > > CC > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#48871) next »