mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Add example to ftp_site() per docbug# 25063. Also link to ftp_raw()
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@137529 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
c9d30be53c
commit
b9799c6942
1 changed files with 27 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.3 -->
|
||||
<refentry id="function.ftp-site">
|
||||
<refnamediv>
|
||||
|
@ -20,9 +20,35 @@
|
|||
useful for handling such things as file permissions and group
|
||||
membership.
|
||||
</para>
|
||||
<example>
|
||||
<title>Sending a SITE command to an ftp server</title>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
/* Connect to FTP server */
|
||||
$conn = ftp_connect('ftp.example.com');
|
||||
if (!$conn) die('Unable to connect to ftp.example.com');
|
||||
|
||||
/* Login as "user" with password "pass" */
|
||||
if (!ftp_login($conn, 'user', 'pass')) die('Error logging into ftp.example.com');
|
||||
|
||||
/* Issue: "SITE CHMOD 0600 /home/user/privatefile" command to ftp server */
|
||||
if (ftp_site($conn, 'CHMOD 0600 /home/user/privatefile')) {
|
||||
echo "Command executed successfully.\n";
|
||||
} else {
|
||||
die('Command failed.');
|
||||
}
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
&return.success;
|
||||
</para>
|
||||
<simpara>
|
||||
See Also:
|
||||
<function>ftp_raw</function>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
|
|
Loading…
Reference in a new issue