pollita         Tue Aug 12 17:28:58 2003 EDT

  Modified files:              
    /phpdoc/en/reference/ftp/functions  ftp-site.xml 
  Log:
  Add example to ftp_site() per docbug# 25063.  Also link to ftp_raw()
  
Index: phpdoc/en/reference/ftp/functions/ftp-site.xml
diff -u phpdoc/en/reference/ftp/functions/ftp-site.xml:1.4 
phpdoc/en/reference/ftp/functions/ftp-site.xml:1.5
--- phpdoc/en/reference/ftp/functions/ftp-site.xml:1.4  Tue Nov 12 06:57:54 2002
+++ phpdoc/en/reference/ftp/functions/ftp-site.xml      Tue Aug 12 17:28:58 2003
@@ -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>
 



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to