cvs: phpdoc-de /reference/ftp/functions ftp-site.xml

From: Date: Thu, 14 Aug 2003 11:43:58 +0000
Subject: cvs: phpdoc-de /reference/ftp/functions ftp-site.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-874@lists.php.net to get a copy of this message
ali Thu Aug 14 07:43:58 2003 EDT Modified files: /phpdoc-de/reference/ftp/functions ftp-site.xml Log: sync to en Index: phpdoc-de/reference/ftp/functions/ftp-site.xml diff -u phpdoc-de/reference/ftp/functions/ftp-site.xml:1.2 phpdoc-de/reference/ftp/functions/ftp-site.xml:1.3 --- phpdoc-de/reference/ftp/functions/ftp-site.xml:1.2 Sun Jun 9 06:55:40 2002 +++ phpdoc-de/reference/ftp/functions/ftp-site.xml Thu Aug 14 07:43:58 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./de/functions/ftp.xml, last change in rev 1.5 --> <!-- last change to 'ftp-site' in en/ tree in rev 1.3 --> <refentry id="function.ftp-site"> @@ -14,10 +14,9 @@ <methodparam><type>int</type><parameter>ftp_stream</parameter></methodparam> <methodparam><type>string</type><parameter>cmd</parameter></methodparam> </methodsynopsis> - <para> - Bei erfolgreicher Ausführung wird &true;, sonst &false; zurück - gegeben - </para> + <para> + &return.success; + </para> <para> <function>ftp_site</function> sendet das in <parameter>cmd</parameter> stehende Kommando zum FTP-Server. @@ -25,6 +24,35 @@ verschieden. Sie sind nützlich, um Sachen wie Datei-Zugriffsrechte und Gruppen-Mitgliedschaften zu handhaben. </para> + <example> + <title>Senden eines SITE Kommandos an den FTP Server</title> + <programlisting role="php"> +<![CDATA[ +<?php +/* Zum FTP Server verbinden */ +$conn = ftp_connect('ftp.example.com'); +if (!$conn) die('Unable to connect to ftp.example.com'); + +/* Als "user" mit dem Passwort "pass" einloggen */ +if (!ftp_login($conn, 'user', 'pass')) die('Error logging into ftp.example.com'); + +/* Das Kommando "SITE CHMOD 0600 /home/user/privatefile" an den Server senden */ +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> + Siehe auch: + <function>ftp_raw</function> + </simpara> </refsect1> </refentry>

« previous php.doc.de (#874) next »