How to upload a file via ftp in PHP?
问题 I have a form with html browse type and a submit button. I chose a file using browse button and submit the form. On form submission following code is called. $conn_id="myid"; $conn_id = ftp_connect ( 'server' ); $ftp_user_name="username"; $ftp_user_pass="password"; // login with username and password $login_result = ftp_login ( $conn_id , $ftp_user_name , $ftp_user_pass ); // check connection if ((! $conn_id ) || (! $login_result )) { echo "FTP connection has failed!" ; exit; } else { echo