reference/ssh2/functions/ssh2-sftp.xml
b95d28e6ec86e4a71e012737d36ebdc1cf009180
...
...
@@ -9,7 +9,7 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>resource</type><methodname>ssh2_sftp</methodname>
12
+
<type class="union"><type>resource</type><type>false</type></type><methodname>ssh2_sftp</methodname>
13
13
<methodparam><type>resource</type><parameter>session</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
...
...
@@ -39,7 +39,8 @@
39
39
<para>
40
40
This method returns an <literal>SSH2 SFTP</literal> resource for use with
41
41
all other ssh2_sftp_*() methods and the
42
-
<link linkend="wrappers.ssh2">ssh2.sftp://</link> fopen wrapper.
42
+
<link linkend="wrappers.ssh2">ssh2.sftp://</link> fopen wrapper,
43
+
&return.falseforfailure;.
43
44
</para>
44
45
</refsect1>
45
46

...
...
@@ -56,7 +57,7 @@ ssh2_auth_password($connection, 'username', 'password');
56
57

57
58
$sftp = ssh2_sftp($connection);
58
59

59
-
$stream = fopen("ssh2.sftp://$sftp/path/to/file", 'r');
60
+
$stream = fopen('ssh2.sftp://' . intval($sftp) . '/path/to/file', 'r');
60
61
?>
61
62
]]>
62
63
</programlisting>
63
64