LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: garagod@gmail.com Date: Mon Oct 6 11:36:50 2008 Subject: note 86168 added to function.rename
When I'm using unlink() or rename() with a SSH2.SFTP wrapper, both functions always return FALSE (but without a warning) even on success.
Example:
$connection = ssh2_connect(SERVER_NAME, PORT);
ssh2_auth_password($connection, USERNAME, PASSWORD);
$sftp = ssh2_sftp($connection);
unlink("ssh2.sftp://$sftp/" . REMOTE_DIRECTORY . FILENAME); // returns FALSE on success and on failure
rename("ssh2.sftp://$sftp/" . REMOTE_DIRECTORY . OLD_FILENAME, "ssh2.sftp://$sftp/" . REMOTE_DIRECTORY . NEW_FILENAME); // returns FALSE on success and on failure
----
Server IP: 82.160.94.10
Probable Submitter: 89.174.83.253
----
Manual Page -- http://www.php.net/manual/en/function.rename.php
Edit -- https://master.php.net/note/edit/86168
Del: integrated -- https://master.php.net/note/delete/86168/integrated
Del: useless -- https://master.php.net/note/delete/86168/useless
Del: bad code -- https://master.php.net/note/delete/86168/bad+code
Del: spam -- https://master.php.net/note/delete/86168/spam
Del: non-english -- https://master.php.net/note/delete/86168/non-english
Del: in docs -- https://master.php.net/note/delete/86168/in+docs
Del: other reasons-- https://master.php.net/note/delete/86168
Reject -- https://master.php.net/note/reject/86168
Search -- https://master.php.net/manage/user-notes.php
| Navigate in group php.notes at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |