note 63641 added to ref.ssh2

From: Date: Mon, 27 Mar 2006 05:08:32 +0000
Subject: note 63641 added to ref.ssh2
Groups: php.notes 
Request: Send a blank email to php-notes+get-106696@lists.php.net to get a copy of this message
To slightly correct the directory listing code below.... <?php $connection = ssh2_connect("hostname", 22); // use any of the ssh2_auth_* methods ssh2_auth_password($connection,"username", "password"); $sftp = ssh2_sftp($connection); $dir = "ssh2.sftp://$sftp/path/to/dir/"; $dh = opendir($dir); while ($file = readdir($dh)) { echo "$file is in hostname:/path/to/dir\ n"; } closedir($dh); ?> (thanks to Sara for assisting) ---- Server IP: 66.163.161.117 Probable Submitter: 63.202.24.220 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/ref.ssh2.php Edit -- http://master.php.net/note/edit/63641 Del: integrated -- http://master.php.net/note/delete/63641/integrated Del: useless -- http://master.php.net/note/delete/63641/useless Del: bad code -- http://master.php.net/note/delete/63641/bad+code Del: spam -- http://master.php.net/note/delete/63641/spam Del: non-english -- http://master.php.net/note/delete/63641/non-english Del: in docs -- http://master.php.net/note/delete/63641/in+docs Del: other reasons-- http://master.php.net/note/delete/63641 Reject -- http://master.php.net/note/reject/63641 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#106696) next »