I am making a ftp image upload using jquery and php i am using ajax to send the data. I have the following code but its not working i am getting the following error.
Error:
Warning: ftp_put() [function.ftp-put]: httpdocs/user_images/: Not a regular file in /var/www/vhosts/kbba.biz/httpdocs/admin/php/upload.php on line 21
This is the tmp_name: /tmp/phpQbG3el
Code:
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
ftp_put($conn_id, "httpdocs/user_images/", $_FILES['fileToUpload']['tmp_name'], FTP_BINARY);
print_r($_FILES['fileToUpload']['tmp_name']);
ftp_close($conn_id);