Chris Carlson wrote:
> 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,
At a guess, the value you are using as a filename is incorrect, but you are
suppressing any error message from fopen - better that you test that result
and be prepared to handle an error situation.
For a further guess, the value $username doesn't have a trailing slash.
--
David Robley
NUMBER CRUNCHING: Jumping on a Computer.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php