|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hey there.
I'm trying to use these newer FTP functions - and I keep getting errors: "Error opening C:\dir\file.jpg in /usr/local/www/place/upload.php on line 33". What am I missing? That line has the the ftp_put() function on it. J |
|
#2
|
|||
|
|||
|
can you post your segment of code for your ftp session from connect to close?
-J |
|
#3
|
|||
|
|||
|
code
/*******FTP ACTION*********/
$conn_id = ftp_connect("ftp.place.com"); if (!$conn_id){ //Check to see if connection exists echo "CANT CONNECT"; die(); } // login with username and password $login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass"); if (!$login_result) { // check for valid login echo "<BR><BR><B>BAD LOGIN"; die(); } // upload the file $pic1 = str_replace("\\\\", "\\", $pic1); // replace the double // slashes Windows inserts // in its addresses. $upfile1 = "dir/dir2/".$newfilename1; $upload = ftp_put($conn_id, $upfile1, $pic1, FTP_BINARY); // check upload status if (!$upload) { echo "WARNING: UPLOAD HAS FAILED. TRY AGAIN."; die(); } else { ftp_quit($conn_id); } /********END FTP ACTION*********/ Last edited by jeofoyster : June 15th, 2001 at 04:24 PM. |
|
#4
|
||||
|
||||
|
Hi,
Did u find any solution? I am also getting stuck at this point... My FTP script works fine transferring other files (other than IMAGE files)...but with images...it throows a Warning that it wasn't able to read the files. Any idea why? OS: Win2k [Windows NT 5.0 build 2195] Web Server: Apache [2.0.39] PHP: 4.2.2 Thanks in advance Regards WC
__________________
Hard work never killed anyone, but why give it a chance? |
|
#5
|
||||
|
||||
|
tintin please post your code in a NEW thread over in the PHP forums someone will answer you there.
Also please NOTE that this post was from 2001 we really rather not have old post brought back up, espetially when your question can be answered in the above mentioned forum.
__________________
Miscellaneous Software Viper_SB Developershed E-Support Anyone else play chess? Challenge me |
|
#6
|
||||
|
||||
|
Thanks Viper,
I will follow your advise. Regards WC |
![]() |
| Viewing: Dev Shed Forums > System Administration > FTP Help > PHP's FTP Functions - problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|