note 92007 deleted from function.fopen by danbrown

From: Date: Wed, 23 Sep 2009 21:13:47 +0000
Subject: note 92007 deleted from function.fopen by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161000@lists.php.net to get a copy of this message
Note Submitter: ken dot gregg at rwre dot com ---- I ran into a problem with || die("Couln't open file") in-line with fopen() $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". Removing the || die() fixes the problem. $write_handle = fopen($write_file, "w"); // || die("Couln't open users_v2!");

« previous php.notes (#161000) next »