uploading with ftp

From: Date: Thu, 12 Apr 2001 05:21:54 +0000
Subject: uploading with ftp
Groups: php.general 
Request: Send a blank email to php-general+get-48245@lists.php.net to get a copy of this message
I'm getting this: "Warning: error opening in /path/to/file.php on line 32" Here's what I want to do, maybe I'm approaching it incorrectly? I need to collect multiple files via a form and upload them via FTP (can't use HTTP because I'm uploading to a different server). I collect them just fine, but my process script connects, changes directories, makes a new directory to insert the files into and changes to that new directory, but it fails on the ftp_put() call. Here is the code. I've also tried to simplify it to just one file with no success. I think I'm just missing something about the ftp_put function. <PRE> for ($i=1; $i<=$num_spots; $i++) { $upload = ftp_put($conn_id, "$new_file[$i]", "$new_file[$i]", FTP_BINARY); if (!$upload) echo "FTP upload for '$new_title[$i]' has failed!<BR>"; else echo "Uploaded '$new_title[$i]' to '$__ftphost__' as '$new_file[$i]'.<BR>"; } </PRE> Thanks for your help. David Minor

« previous php.general (#48245) next »