note 93710 deleted from function.fopen by danbrown

From: Date: Wed, 23 Sep 2009 21:13:12 +0000
Subject: note 93710 deleted from function.fopen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-160999@lists.php.net to get a copy of this message
Note Submitter: timwood0 at pacbell dot net ---- A note to ken dot gregg at rwre dot com: > $write_handle = fopen($write_file, "w") || die("Couln't open file"); > fclose($write_handle); > > Returns a "supplied argument is not a valid stream resource" error in the fclose() > and file handle is 1. > The returned file handle should be something like "Resource id #x". The code executes properly. The code to the right of the = evaluates to a Boolean value, which is not a valid file handle. Replace '||' with 'or'.

« previous php.notes (#160999) next »