Trying to get a remote file with spaces in its name?
Never forget to use quotes in the remote filename, but never in the local one.
Example:
<?php
$remote_file_name="my name with spaces.ext"
ssh2_scp_recv($cn,$remote_file_name,$local_path."/".$remote_file_name); ssh2_scp_recv($cn,"\"".$remote_file_name."\"",$local_path."/".$remote_file_name); ssh2_scp_recv($cn,"\"".$remote_file_name."\"","\"".$local_path."/".$remote_file_name."\""); ?>
So, the quotes in the file name are needed only for remote, not for local.