note 86167 added to function.unlink

From: Date: Mon, 06 Oct 2008 17:36:20 +0000
Subject: note 86167 added to function.unlink
Groups: php.notes 
Request: Send a blank email to php-notes+get-145096@lists.php.net to get a copy of this message
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.177.164.100 Probable Submitter: 89.174.83.253 ---- Manual Page -- http://www.php.net/manual/en/function.unlink.php Edit -- https://master.php.net/note/edit/86167 Del: integrated -- https://master.php.net/note/delete/86167/integrated Del: useless -- https://master.php.net/note/delete/86167/useless Del: bad code -- https://master.php.net/note/delete/86167/bad+code Del: spam -- https://master.php.net/note/delete/86167/spam Del: non-english -- https://master.php.net/note/delete/86167/non-english Del: in docs -- https://master.php.net/note/delete/86167/in+docs Del: other reasons-- https://master.php.net/note/delete/86167 Reject -- https://master.php.net/note/reject/86167 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145096) next »