Home  |  Linux  | Mysql  | PHP  | XML
From:garagod@gmail.com Date:Mon Oct  6 11:36:20 2008
Subject:note 86167 added to function.unlink
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

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