mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 19:08:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@179629 c90b9560-bf6c-de11-be94-00142212c4b1
111 lines
2.9 KiB
XML
111 lines
2.9 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.8 $ -->
|
|
<refentry id="function.ftp-site">
|
|
<refnamediv>
|
|
<refname>ftp_site</refname>
|
|
<refpurpose>Sends a SITE command to the server</refpurpose>
|
|
</refnamediv>
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>ftp_site</methodname>
|
|
<methodparam><type>resource</type><parameter>ftp_stream</parameter></methodparam>
|
|
<methodparam><type>string</type><parameter>command</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
<function>ftp_site</function> sends the given <literal>SITE</literal>
|
|
command to the FTP server.
|
|
</para>
|
|
<para>
|
|
<literal>SITE</literal> commands are not standardized, and vary from server
|
|
to server. They are useful for handling such things as file permissions and
|
|
group membership.
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>ftp_stream</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The link identifier of the FTP connection.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>command</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
The SITE command. Note that this parameter isn't escaped so there may
|
|
be some issues with filenames containing spaces and other characters.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<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>
|
|
</refsect1>
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>ftp_raw</function></member>
|
|
</simplelist>
|
|
</para>
|
|
</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
|
|
-->
|