note 53614 added to function.stat

From: Date: Tue, 07 Jun 2005 12:53:15 +0000
Subject: note 53614 added to function.stat
Groups: php.notes 
Request: Send a blank email to php-notes+get-90056@lists.php.net to get a copy of this message
If you have ftp (and the related sftp) protocols disabled on your remote server, it can be hard figuring out how to 'stat' a remote file. The following works for me: <?php $conn = ssh2_connect($host, 22); ssh2_auth_password($conn, $user, $password); $stream = ssh2_exec($conn, "stat $fileName > $remotedest"); ssh2_scp_recv($conn, $remotedest, $localdest); $farray = file($localdest); print_r($farray); ?> ---- Manual Page -- http://www.php.net/manual/en/function.stat.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53614 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53614&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53614&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53614&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53614&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53614&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53614&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#90056) next »