php - I could not delete a file over SFTP using curl -
i using below curl code delete file,but not working, can 1 guide me. executing code in ubuntu mechine.(i.e, ubuntu destination machine want delete file)
$ch = curl_init(); curl_setopt( $ch, curlopt_url, "sftp://xdocsuser:test123@192.168.5.229" ); curl_setopt( $ch, curlopt_protocols, curlproto_sftp ); curl_setopt( $ch, curlopt_file, $file ); curl_setopt( $ch, curlopt_userpwd, "$ftp_user_name:$ftp_password" ); curl_setopt($ch, curlopt_quote, array('dele /' . "/library/webserver/documents/sftp/receive/supplier_orders_daily_export_1.csv")); curl_setopt( $ch, curlopt_returntransfer, true ); curl_exec( $ch ); curl_close( $ch );
Comments
Post a Comment