FTP upload path on PHP -


here folder's reource.

path : /www/partner/bulk_files location : ftp://plus1000@exampleip/www/plus1000/www/partner/bulk_files 

i couldn't upload.

what ploblem. t^t

$ftp_host = "exampleip";     $ftp_hostid = "id";     $ftp_hostpwd = "password";     $connect_id =ftp_connect($ftp_host) or die("fail");      $bulk_uploaddir = '/www/partner/bulk_files';      $login_ftp_result = ftp_login($connect_id, $ftp_hostid, $ftp_hostpwd);      if ((!$connect_id) || (!$login_ftp_result)) {          echo "ftp connection has failed!";          echo "attempted connect $ftp_host user $ftp_hostid";          die;      } else {          echo "connected $ftp_host, user $ftp_hostid<br/-->";      }          echo "<hr>";      if (ftp_put($connect_id, $bulk_uploaddir, $_files["file"]["name"], ftp_ascii)) {         echo "<br>succes upload<br>";     } else {         echo "<br>fail upload<br>";     } 

result "warning: ftp_put(35513.jpg): failed open stream: no such file or directory in /www/plus1000/www/partner/bulk_update.php on line 78 " fail upload

what path?

if uploading file uploaded via form post use tmp_name not name

if (ftp_put($connect_id, $bulk_uploaddir, $_files["file"]["tmp_name"], ftp_ascii)) 

also if uploading image use ftp_binary instead of ftp_ascii


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -