note 94651 added to function.ssh2-sftp
| From: | sandipshah at vthrive dot com | Date: | Mon, 16 Nov 2009 23:05:51 +0000 |
| Subject: | note 94651 added to function.ssh2-sftp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-162965@lists.php.net to get a copy of this message | ||
In
$stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r');
please make sure that you are specifying the "absolute" path to a file.
If not, you'll get errors like
"Unable to open file ..."
The reasoning is simple ... ssh2.sftp://$sftp points to the
"root" directory on the remote server, where, most likely, one does not have access.
It is necessary to point it to your "home" directory. For example, "ssh2.sftp://$sftp/home/username/filename" ...
where "/home/username" is where your home directory is.
----
Server IP: 69.147.83.197
Probable Submitter: 99.22.51.223
----
Manual Page -- http://www.php.net/manual/en/function.ssh2-sftp.php
Edit -- https://master.php.net/note/edit/94651
Del: integrated -- https://master.php.net/note/delete/94651/integrated
Del: useless -- https://master.php.net/note/delete/94651/useless
Del: bad code -- https://master.php.net/note/delete/94651/bad+code
Del: spam -- https://master.php.net/note/delete/94651/spam
Del: non-english -- https://master.php.net/note/delete/94651/non-english
Del: in docs -- https://master.php.net/note/delete/94651/in+docs
Del: other reasons-- https://master.php.net/note/delete/94651
Reject -- https://master.php.net/note/reject/94651
Search -- https://master.php.net/manage/user-notes.php