RE: [PHP] Not a Valid File-Handle Resource

From: Date: Tue, 30 Jul 2002 04:22:05 +0000
Subject: RE: [PHP] Not a Valid File-Handle Resource
Groups: php.general 
Request: Send a blank email to php-general+get-110287@lists.php.net to get a copy of this message
1. Take out the @ before fopen(), this may shed some light on your problem 2. What does "/home/blurredv/data/".$username."Contact.txt" expand out to actually be? 3. Does the script have write access to the directory/file? -----Original Message----- From: Chris Carlson [mailto:chris@deletedscenes.org] Sent: Tuesday, July 30, 2002 1:09 PM To: php-general@lists.php.net Subject: [PHP] Not a Valid File-Handle Resource I am trying to create a php program and am getting an error in this area of my script: $dataFile = @fopen("/home/blurredv/data/".$username."Contact.txt","w"); fputs($dataFile, $line); fclose ($dataFile); These are the errors: Warning: Supplied argument is not a valid File-Handle resource in /home/blurredv/public_html/redcarbon/update.php on line 34 Warning: Supplied argument is not a valid File-Handle resource in /home/blurredv/public_html/redcarbon/update.php on line 35 Note: My script work perfectly with different path names under Windows NT. Do I have to do something special for Unix. Thanks in advance, Chris Carlson totaldeveloper.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#110287) next »