mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146870 c90b9560-bf6c-de11-be94-00142212c4b1
76 lines
2.1 KiB
XML
76 lines
2.1 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- splitted from ./en/functions/ftp.xml, last change in rev 1.3 -->
|
|
<refentry id="function.ftp-site">
|
|
<refnamediv>
|
|
<refname>ftp_site</refname>
|
|
<refpurpose>Sends a SITE command to the server</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>ftp_site</methodname>
|
|
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>cmd</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>ftp_site</function> sends the command specified by
|
|
<parameter>cmd</parameter> to the FTP server. SITE commands
|
|
are not standardized, and vary from server to server. They are
|
|
useful for handling such things as file permissions and group
|
|
membership.
|
|
</para>
|
|
<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>
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
<simpara>
|
|
See Also:
|
|
<function>ftp_raw</function>
|
|
</simpara>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|