Bug #10797 Updated: tmpfile() Does not work in version PHP4 only in PHP3

From: Date: Fri, 11 May 2001 08:21:36 +0000
Subject: Bug #10797 Updated: tmpfile() Does not work in version PHP4 only in PHP3
Groups: php.dev 
Request: Send a blank email to php-dev+get-54835@lists.php.net to get a copy of this message
ID: 10797 Updated by: andi Reported By: jsh@so.estec.esa.nl Old-Status: Open Status: Closed Bug Type: Filesystem function related Operating system: PHP Version: 4.0.5 Assigned To: Comments: ftp_fget($connect, "$FORWARD_TMP", ".forward", FTP_ASCII); You are passing the file pointer resource as a string "$FORWARD_TMP". This is incorrect. You should pass it as a regular variable without the double quotes. i.e. $FORWARD_TMP Previous Comments: --------------------------------------------------------------------------- [2001-05-10 13:24:27] jsh@so.estec.esa.nl <?php $MAIL_SERVER = "some.mail.server.com"; $FORWARD_TMP = tmpfile(); $connect = ftp_connect("$MAIL_SERVER"); ftp_fget($connect, "$FORWARD_TMP", ".forward", FTP_ASCII); ?> Following code above give this error message: Warning: Supplied argument is not a valid File-Handle resource in /export1/www/docs/users/jsh/testtmp.php on line 7 In PHP3 it works on Solaris 2.6 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=10797&edit=2

« previous php.dev (#54835) next »