note 117349 added to function.ssh2-sftp
| From: | Josh | Date: | Mon, 25 May 2015 20:47:39 +0000 |
| Subject: | note 117349 added to function.ssh2-sftp | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202666@lists.php.net to get a copy of this message | ||
Note that you must enter the full wrapper URI order for functions that accept those parameters to
work properly. For example, this (which is referenced more than once in other comments) does not
work:
while (false !== ($file = readdir($handle))) if (is_dir($file)) { /* ... */ }
This does work:
$sc = ssh2_sftp(...);
while (false !== ($file = readdir($handle))) if (is_dir("ssh2.sftp://$sc/$file")) { /* ... */ }
You need to pass the "path" into these functions as an fopen() wrapper URI.
----
Server IP: 72.52.91.14
Probable Submitter: 98.19.4.255
----
Manual Page -- http://php.net/manual/en/function.ssh2-sftp.php
Edit -- https://master.php.net/note/edit/117349
Del: integrated -- https://master.php.net/note/delete/117349/integrated
Del: useless -- https://master.php.net/note/delete/117349/useless
Del: bad code -- https://master.php.net/note/delete/117349/bad+code
Del: spam -- https://master.php.net/note/delete/117349/spam
Del: non-english -- https://master.php.net/note/delete/117349/non-english
Del: in docs -- https://master.php.net/note/delete/117349/in+docs
Del: other reasons-- https://master.php.net/note/delete/117349
Reject -- https://master.php.net/note/reject/117349
Search -- https://master.php.net/manage/user-notes.php