It gives me an error "Warning: error opening none in .... Line 51 (which is the ftp_put())
-----Original Message----- From: Joseph W. Goff [mailto:[EMAIL PROTECTED]] Sent: 16 December 2002 17:53 To: php-general; Marios Adamantopoulos Subject: Re: [PHP] FTP Can't create temp file? What happens when you remove the suppresion operator (@) from the move_upload_file and why not just use ftp_put()? That has always worked fine for me. ----- Original Message ----- From: "Marios Adamantopoulos" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 16, 2002 11:06 AM Subject: [PHP] FTP Can't create temp file? > > Hi all again > > I'm trying to upload to a unix server. The program I use works fine on > my 2000 IIS machine but it has a problem on the online one. > Permittions have been checked and I've been looking all day to find > something, but natha... > > I would appreciate it if someone can have a look and suggest > something. Here > is the script: > > > $conn_id = ftp_connect($ftpServer); > $login_result = ftp_login($conn_id, $ftpUser, $ftpPass); > if ((!$conn_id) || (!$login_result)) { > echo "FTP connection has failed!"; > echo "Attempted to connect to $ftpServer for user $ftpUser"; > exit; > } else { > //echo "Connected to $ftpServer, for user $ftpUser"; } > > > $phpftp_dir = ""; > > echo "<br>--" . ftp_pwd($conn_id) . "<br>"; > > > $phpftp_tmpdir="/tmp"; > > > srand((double)microtime()*1000000); > $randval = rand(); > $tmpfile=$phpftp_tmpdir . "/" . $thefile_name . "." . $randv; > > echo "Temp file: " . $tmpfile . "<br>"; > > > if (!@move_uploaded_file($thefile,$tmpfile)) { > echo "Upload failed! Can't create temp file"; > } else { > ftp_chdir($conn_id,$phpftp_dir); > ftp_put($conn_id,$thefile_name,$tmpfile,FTP_BINARY); > //ftp_quit($conn_id); > unlink($tmpfile); > } > > --- > I always get: "Upload failed! Can't create temp file" > > Thank you guys in advance > > Mario > > > > _________________________ > Marios Adamantopoulos > Senior Developer > > Tonic > +44 (0)20 7691 2227 > +44 (0)7970 428 372 > www.tonic.co.uk > > Recent projects > www.polydor.co.uk > www.adcecreative.org > www.sony-europe.com/pocketlife > ............................................................................ > .................................... > Opinions, conclusions and other information in this message that do not > relate to the official business of Tonic Design Limited shall be > understood as neither given nor endorsed by them. > ............................................................................ > .................................... > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php