curl - How to upload file using PHP on Synology NAS / FTP Server? -


i want make file , upload on synology nas using php. our nas, it's support ftp tried use ftp_put() here , tried use curl() here. still cannot upload file nas. both of code running , doesn't show message error.

here's destination path on our synology nas : /dms/upload-file/

and here's simple code using ftp_put():

$ftp_path = '/dms/upload-file/'.$_files["uploadedfile"]["name"]; $conn_id = ftp_ssl_connect($host,$port); $login_result = ftp_login ( $conn_id , $username , $password ); $upload = ftp_put($conn_id, $ftp_path, $_files["uploadedfile"]["tmp_name"], ftp_ascii); print (!$upload) ? $bgalert.'there problem while uploading '.$ftp_path.'</p>' : $bgalert.'upload complete</p>'; ftp_close($conn_id);  

the result always

there problem while uploading /dms/upload-file/filename.jpg

can me how fix our problem ? need help. thank you.

can check folder permission /dms/upload-file/ ?


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -