cvs: peardoc /en/package/networking net-ftp.xml /en/package/networking/net-ftp cd.xml checkfileextension.xml connect.xml constants.xml disconnect.xml
exec.xml get.xml getrecursive.xml login.xml ls.xml mdtm.xml mkdir.xml net-ftp.xml put.xml putrecursive.xml pwd.xml rm.xml size.xml

From: Date: Sun, 24 Aug 2003 10:07:04 +0000
Subject: cvs: peardoc /en/package/networking net-ftp.xml /en/package/networking/net-ftp cd.xml checkfileextension.xml connect.xml constants.xml disconnect.xml
exec.xml get.xml getrecursive.xml login.xml ls.xml mdtm.xml mkdir.xml net-ftp.xml put.xml putrecursive.xml pwd.xml rm.xml size.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-1386@lists.php.net to get a copy of this message
xnoguer Sun Aug 24 06:07:04 2003 EDT Added files: /peardoc/en/package/networking net-ftp.xml /peardoc/en/package/networking/net-ftp cd.xml checkfileextension.xml connect.xml constants.xml disconnect.xml exec.xml get.xml getrecursive.xml login.xml ls.xml mdtm.xml mkdir.xml net-ftp.xml put.xml putrecursive.xml pwd.xml rm.xml size.xml Log: adding net-ftp for tobias

Index: peardoc/en/package/networking/net-ftp.xml +++ peardoc/en/package/networking/net-ftp.xml <!-- $Revision: 1.1 $ --> <sect1 id="package.networking.net-ftp"> <title>Net_FTP</title> <para> Net_FTP provides comfortable communication with FTP-Servers. It mainly provides an OO wrapper to PHP's integrated FTP functions, adding some missing features like recursive up- and downloading of complete folders, so as deleting. The directorylisting possibilites were although extended to feature well structured listing of directories and/or files. </para> <para> Net_FTP works fine for it's functionality, which will be extended by features like recursive filepermission change (over SITE command), different ways of dirlistings, Windows support and more. Another idea is to implement a fallback for the PHP functions using sockets. </para> &package.networking.net-ftp.constants; &package.networking.net-ftp.net-ftp; &package.networking.net-ftp.connect; &package.networking.net-ftp.disconnect; &package.networking.net-ftp.login; &package.networking.net-ftp.cd; &package.networking.net-ftp.pwd; &package.networking.net-ftp.mkdir; &package.networking.net-ftp.exec; &package.networking.net-ftp.mdtm; &package.networking.net-ftp.size; &package.networking.net-ftp.ls; &package.networking.net-ftp.rm; &package.networking.net-ftp.get; &package.networking.net-ftp.put; &package.networking.net-ftp.getrecursive; &package.networking.net-ftp.putrecursive; &package.networking.net-ftp.checkfileextension; </sect1> <!-- 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 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 --> Index: peardoc/en/package/networking/net-ftp/cd.xml +++ peardoc/en/package/networking/net-ftp/cd.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.cd"> <refnamediv> <refname>Net_FTP::cd()</refname> <refpurpose>changes the directory on the server.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::cd</function></funcdef> <paramdef> string <parameter>$directory</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.cd.desc"> &title.desc; <para> Changes the directory on the FTP server you are logged in. The parameter can either be an absolute path (e.g. '/home/mydir') or a relative one (e.g. 'mydir'). </para> </refsect1> <refsect1 id="package.networking.net-finger.cd.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $directory</parameter> - The directory you want to change to. This can either be an absolute path (e.g. '/home/mydir') or a relative one (e.g. 'mydir'). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.cd.return"> &title.returns; <para> <parameter>mixed</parameter> - true on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.cd.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Directory change failed" will be returend if the opeartion fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.cd.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.cd.example"> &title.example; <example> <title>Using <function>cd</function></title> <programlisting role="php"> <![CDATA[ <?php $test->cd('../mydir'); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/checkfileextension.xml +++ peardoc/en/package/networking/net-ftp/checkfileextension.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.checkfileextension"> <refnamediv> <refname>Net_FTP::checkFileExtension()</refname> <refpurpose>check extensions.ini for the transfermode of a specific file.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::checkfileextension</function></funcdef> <paramdef> string <parameter>$filename</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.checkfileextension.desc"> &title.desc; <para> This method checks a given filename for it's proper transfermode (using extensions.ini). if the file extension can not be found, the class falls back to the standard transfer mode (attribute). </para> </refsect1> <refsect1 id="package.networking.net-finger.checkfileextension.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $filename</parameter> - The filename to check extension for. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.checkfileextension.return"> &title.returns; <para> <parameter>int</parameter> - either <constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>. </para> </refsect1> <refsect1 id="package.networking.net-ftp.checkfileextension.throws"> &title.throws; <para> No errors. Allways a filetransfermode should be returned. </para> </refsect1> <refsect1 id="package.networking.net-ftp.checkfileextension.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.checkfileextension.example"> &title.example; <example> <title>Using <function>checkFileExtension</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->checkfileextension('foo/bar.zip')); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/connect.xml +++ peardoc/en/package/networking/net-ftp/connect.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.connect"> <refnamediv> <refname>Net_FTP::connect()</refname> <refpurpose>connects to a given FTP server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::connect</function></funcdef> <paramdef> string <parameter><optional>$host = null</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$port = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.connect.desc"> &title.desc; <para> Create a new object for communication with FTP servers. </para> </refsect1> <refsect1 id="package.networking.net-ftp.connect.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter><optional>string $host = null</optional></parameter> - The host to connect to ( either an IP adress or a domain name). This parameter can be left out, if it has been set in the constructor or manualy! </para> </listitem> <listitem> <para> <parameter><optional>int $port = null</optional></parameter> - The port to connect to on the server. This parameter can be left out, if it has been set in the constructor or manualy! </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.connect.return"> &title.returns; <para> <parameter>mixed</parameter> - true on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.connect.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Connection failed" will be returend if the connection fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.connect.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.connect.example"> &title.example; <example> <title>Using <function>connect</function></title> <programlisting role="php"> <![CDATA[ <?php $test->connect('192.168.0.1', 21); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/constants.xml +++ peardoc/en/package/networking/net-ftp/constants.xml <refentry id="package.networking.ftp.extensions-ini"> <refnamediv> <refname>&title.constants;</refname> <refpurpose>&purpose.preconstants;</refpurpose> </refnamediv> <refsect1 id="package.networking.net-ftp.constants.net-ftp-files-only"> <title><constant>NET_FTP_FILES_ONLY</constant></title> <para> Makes <link linkend="package.networking.ftp.ls">FTP::ls()</link> return a structures array of files (no directorys) in a directory. </para> </refsect1> <refsect1 id="package.networking.net-ftp.constants.net-ftp-dirs-only"> <title><constant>NET_FTP_DIRS_ONLY</constant></title> <para> Makes <link linkend="package.networking.ftp.ls">FTP::ls()</link> return a structures array of directories (no files) in a directory. </para> </refsect1> <refsect1 id="package.networking.net-ftp.constants.net-ftp-dirs-files"> <title><constant>NET_FTP_DIRS_FILES</constant></title> <para> Makes <link linkend="package.networking.ftp.ls">FTP::ls()</link> return a structures array of directories and files in a directory. </para> </refsect1> <refsect1 id="package.networking.net-ftp.constants.net-ftp-rawlist"> <title><constant>NET_FTP_RAWLIST</constant></title> <para> Makes <link linkend="package.networking.ftp.ls">FTP::ls()</link> return an unstructred array as returned by PHP functions ftp_raw_list(). </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 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 --> Index: peardoc/en/package/networking/net-ftp/disconnect.xml +++ peardoc/en/package/networking/net-ftp/disconnect.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.disconnect"> <refnamediv> <refname>Net_FTP::disconnect()</refname> <refpurpose>connects to a given FTP server</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::connect</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.query.desc"> &title.desc; <para> Disconnect from the FTP server you're connected to. </para> </refsect1> <refsect1 id="package.networking.net-ftp.query.return"> &title.returns; <para> <parameter>void</parameter> </para> </refsect1> <refsect1 id="package.networking.net-ftp.query.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.query.example"> &title.example; <example> <title>Using <function>disconnect</function></title> <programlisting role="php"> <![CDATA[ <?php $test->disconnect(); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/exec.xml +++ peardoc/en/package/networking/net-ftp/exec.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.exec"> <refnamediv> <refname>Net_FTP::exec()</refname> <refpurpose>executes a command on the server.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::exec</function></funcdef> <paramdef> string <parameter>$command</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.exec.desc"> &title.desc; <para> Executes a given command on the server (the SITE EXEC command is added by the method). </para> </refsect1> <refsect1 id="package.networking.net-finger.exec.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $command</parameter> - The command to be executed (without SITE EXEC). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.exec.return"> &title.returns; <para> <parameter>mixed</parameter> - true on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.exec.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is specific. There is only one errornumber wich may occur. The message given by this error willcontain the directory where the error occured in "Execution of command '$command' faild". opeartion fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.exec.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.exec.example"> &title.example; <example> <title>Using <function>exec</function></title> <programlisting role="php"> <![CDATA[ <?php $test->exec($myCommand); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/get.xml +++ peardoc/en/package/networking/net-ftp/get.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.get"> <refnamediv> <refname>Net_FTP::get()</refname> <refpurpose>download a file to the computer your script runs on.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::get</function></funcdef> <paramdef> string <parameter>$remote_file</parameter> </paramdef> <paramdef> string <parameter>$local_file</parameter> </paramdef> <paramdef> bool <parameter><optional>$overwrite = false</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$mode = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.get.desc"> &title.desc; <para> This downloads a file from the FTP server to the computer your script runs on. </para> </refsect1> <refsect1 id="package.networking.net-finger.get.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $remote_file</parameter> - The file you'd like to download. This could either be an absolute or relative path to a file (not a directory! see: <link linkend="package.networking.ftp.getRecursive">Net_FTP::getRecursive()</link>). </para> </listitem> <listitem> <para> <parameter>string $local_file</parameter> - The destination you'd like to download the file to (including filename, no directory!). You can specify this with either an absolute path or a path relative to the scipts directory. (Beware: The script directory is determined by the called script, if you use includes!) </para> </listitem> <listitem> <para> <parameter><optional>bool $overwrite = false</optional></parameter> - Wether to overwrite the local file, if it exists or not. if not set the file will not be overwritten. </para> </listitem> <listitem> <para> <parameter><optional>int $mode = null</optional></parameter> - This has to be one of the constants <constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>. if not specified, the class will try to determine the mode from the file extension (from extensions.ini) or fall back to the standard transfer mode (attribute). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.get.return"> &title.returns; <para> <parameter>mixed</parameter> - true on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.get.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Describtion</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Local file '$local_file' exists and may not be overwriten. </entry> <entry> The local file you specified exists and you did not specify to overwrite it. </entry> <entry> Set parameter $overwrite = true. </entry> </row> <row> <entry> Local file '$file' is not writeable. Can not overwrite. </entry> <entry> You specified to overwrite the localfile. This did not work. </entry> <entry> Maybe you don't have the permission to overwrite the file. Check the filepermissions. </entry> </row> <row> <entry> File '$remote_file' could not be downloaded to '$local_file'. </entry> <entry> The download of the remote file failed. </entry> <entry> This may have several reasons: Maybe the remote file does not exists or the local directory you wanted to download to does not exist or is not writeable. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.get.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.get.example"> &title.example; <example> <title>Using <function>get</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->get('foo/bar.zip', '/tmp/downloaded.zip', true, FTP_BINARY)); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/getrecursive.xml +++ peardoc/en/package/networking/net-ftp/getrecursive.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.getrecursive"> <refnamediv> <refname>Net_FTP::getRecursive()</refname> <refpurpose>download a whole directory to the computer your script runs on.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::getRecursive</function></funcdef> <paramdef> string <parameter>$remote_path</parameter> </paramdef> <paramdef> string <parameter>$local_path</parameter> </paramdef> <paramdef> bool <parameter><optional>$overwrite = false</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$mode = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.getrecursive.desc"> &title.desc; <para> This downloads a whole directory from the FTP server to the computer your script runs on. </para> </refsect1> <refsect1 id="package.networking.net-finger.getrecursive.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $remote_path</parameter> - The directory you'd like to download. This could either be an absolute or relative path to a directory (path has to end with '/'). </para> </listitem> <listitem> <para> <parameter>string $local_path</parameter> - The destination you'd like to download the directory to. You can specify this with either an absolute path or a path relative to the scipts directory. (Beware: The script directory is determined by the called script, if you use includes!) </para> </listitem> <listitem> <para> <parameter><optional>bool $overwrite = false</optional></parameter> - Wether to overwrite the local files, if their exist or not. if not set the directory will not be overwritten. </para> </listitem> <listitem> <para> <parameter><optional>int $mode = null</optional></parameter> - This has to be one of the constants <constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>. if not specified, the class will try to determine the mode from the file extensions (from extensions.ini) or fall back to the standard transfer mode (attribute). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.getrecursive.return"> &title.returns; <para> <parameter>mixed</parameter> - true on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.getrecursive.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Description</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Given remote-path '$remote_path' seems not to be a directory. </entry> <entry> The path you specified on the FTP sever seems not to be a valid directory node. </entry> <entry> Maybe your path does not end with '/' or the directory does not exist. </entry> </row> <row> <entry> Given local-path '$local_path' seems not to be a directory. </entry> <entry> The path you specified on the local host seems not to be a valid directory node. </entry> <entry> Maybe your path does not end with '/' or the directory does not exist. </entry> </row> <row> <entry> Could not create dir '$local_path'. </entry> <entry> The given directorie could not be created. </entry> <entry> Check your permissions on the source-directory. </entry> </row> <row> <entry> Could not create dir '$local_path'. </entry> <entry> The given directorie could not be created. </entry> <entry> Check your permissions on the source-directory. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.getrecursive.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.getrecursive.example"> &title.example; <example> <title>Using <function>getRecursive</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->getRecursive('foo/', '/tmp/foo/', true)); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/login.xml +++ peardoc/en/package/networking/net-ftp/login.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.login"> <refnamediv> <refname>Net_FTP::login()</refname> <refpurpose>logs into the FTP server you are connected to</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::login</function></funcdef> <paramdef> string <parameter><optional>$username = null</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$password = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.login.desc"> &title.desc; <para> Does the login on the FTP server you are connected to. for that you first have to connect to a FTP server before loging in. Username and Password can either be set by the parameters or manualy before (using the set-methods). </para> </refsect1> <refsect1 id="package.networking.net-finger.login.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter><optional>string $username = null</optional></parameter> - The username to be used for login to. This parameter can be left out, if it has been set manualy! </para> </listitem> <listitem> <para> <parameter><optional>int $password = null</optional></parameter> - The password to use for login. This parameter can be left out, if it has been set manualy! </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.login.return"> &title.returns; <para> <parameter>mixed</parameter> - true on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.login.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Login failed" will be returend if the login fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.login.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.login.example"> &title.example; <example> <title>Using <function>login</function></title> <programlisting role="php"> <![CDATA[ <?php $test->login('myuser', 'mypass'); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/ls.xml +++ peardoc/en/package/networking/net-ftp/ls.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.ls"> <refnamediv> <refname>Net_FTP::ls()</refname> <refpurpose>returns the listing of a directory in a specified way.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::ls</function></funcdef> <paramdef> string <parameter><optional>$dir = null</optional></parameter> </paramdef> <paramdef> string <parameter><optional>$mode = <constant>NET_FTP_DIRS_FILES</constant></optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.ls.desc"> &title.desc; <para> this function gives you a listing of either the files / directories / both or an unformated array (like PHP function ftp_rawlist()). </para> </refsect1> <refsect1 id="package.networking.net-finger.ls.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string <optional>$dir = null</optional></parameter> - The directory to list. You can either use a relative or an absolute path. This optional parameter will be set to the current path. </para> </listitem> <listitem> <para> <parameter><optional>int $mode = <constant>NET_FTP_DIRS_FILES</constant></optional></parameter> - A constant representing the nodes wanted to be list (directories, files, both or a ram directory listing). This parameter is determined by the constants ( see: <link linkend="package.networking.ftp.constants">Constants</link>). This parameter is optional and will be set for listing directories and files structured in an array. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.ls.return"> &title.returns; <para> <parameter>mixed</parameter> - a directorylisting in the form you determine on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.ls.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Describtion</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Raw directory-list in wrong format. </entry> <entry> The format given by the server on PHP function ftp_rawlist()was wrong. Check if the directory you wanted to be listed is correct and you have access to listing it. </entry> <entry> Specify a correct directory path (eg. <constant>/my/file/path/</constant>, <constant>../</constant>) and proof (maybe change) the rights on it. </entry> </row> <row> <entry> Could not get last-modification-date of '$file'. </entry> <entry> The last-modification date could not be determined by PHP. This may have the reason, that your FTP-server does not support the used command or that you gave the function a not existing file as reference. </entry> <entry> <itemizedlist> <listitem> <simpara>check the given file for existance</simpara> </listitem> <listitem> <simpara>contact the FTP server's admin</simpara> </listitem> </itemizedlist> </entry> </row> <row> <entry> Date-format failed on timestamp '$res'. </entry> <entry> The given format-string was not well formated. </entry> <entry> Check the documentation of the PHP function date(). </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.ls.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.ls.example"> &title.example; <example> <title>Using <function>ls</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->ls('/foo/bar')); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/mdtm.xml +++ peardoc/en/package/networking/net-ftp/mdtm.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.mdtm"> <refnamediv> <refname>Net_FTP::mdtm()</refname> <refpurpose>returns the last modification date of a file.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::mdtm</function></funcdef> <paramdef> string <parameter>$file</parameter> </paramdef> <paramdef> string <parameter><optional>$format = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.mdtm.desc"> &title.desc; <para> gives you the last modification-date of a file either as a unix timestamp or in a formted date. </para> </refsect1> <refsect1 id="package.networking.net-finger.mdtm.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $file</parameter> - The file to check. </para> <para> <parameter><optional>string $format</optional></parameter> - A date()-function styled format- string. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.mdtm.return"> &title.returns; <para> <parameter>mixed</parameter> - the last modification date on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.mdtm.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Describtion</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Filename '$file' seems to be a directory. </entry> <entry> The filename you gave the method does not reference a regular-file but a directory. </entry> <entry> Specify a correct filenamepath (eg. <constant>/my/file/path/foo.html</constant>, <constant>../foo.html</constant>). </entry> </row> <row> <entry> Could not get last-modification-date of '$file'. </entry> <entry> The last-modification date could not be determined by PHP. This may have the reason, that your FTP-server does not support the used command or that you gave the function a not existing file as reference. </entry> <entry> <itemizedlist> <listitem> <simpara>check the given file for existance</simpara> </listitem> <listitem> <simpara>contact the FTP server's admin</simpara> </listitem> </itemizedlist> </entry> </row> <row> <entry> Date-format failed on timestamp '$res'. </entry> <entry> The given format-string was not well formated. </entry> <entry> Check the documentation of the PHP function date(). </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.mdtm.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.mdtm.example"> &title.example; <example> <title>Using <function>mdtm</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->mdtm('/foo/bar')); // returns the last modification time in german timeformat var_dump($test->mdtm('/foo/bar', 'd.m.Y, H:i')); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/mkdir.xml +++ peardoc/en/package/networking/net-ftp/mkdir.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.mkdir"> <refnamediv> <refname>Net_FTP::mkdir()</refname> <refpurpose>creates a new directory.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::mkdir</function></funcdef> <paramdef> string <parameter>$directory</parameter> </paramdef> <paramdef> bool <parameter><optional>$recursive = false</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.mkdir.desc"> &title.desc; <para> Creates a new directory on the FTP server. You can give this function either a relative or an absolute path as the first parameter. The second (optional) parameter lets you create directories recursively (meaning you can create './my/new/dir' without /my even exists. All 3 directories would be created). </para> </refsect1> <refsect1 id="package.networking.net-finger.mkdir.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $directory</parameter> - The directory you want to create. This can either be an absolute path (e.g. '/home/mydir') or a relative one (e.g. 'mydir'). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.mkdir.return"> &title.returns; <para> <parameter>mixed</parameter> - true on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.mkdir.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is specific. There is only one errornumber wich may occur. The message given by this error willcontain the directory where the error occured in "Creation of '$dir' failed". opeartion fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.mkdir.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.mkdir.example"> &title.example; <example> <title>Using <function>mkdir</function></title> <programlisting role="php"> <![CDATA[ <?php $test->mkdir('../mydir'); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/net-ftp.xml +++ peardoc/en/package/networking/net-ftp/net-ftp.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.net-ftp"> <refnamediv> <refname>Net_FTP::Net_FTP()</refname> <refpurpose>constructor</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>object <function>Net_FTP::Net_FTP</function></funcdef> <paramdef> string <parameter><optional>$host = null</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$port = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.net-ftp.desc"> &title.desc; <para> Create a new object for communication with FTP servers. </para> </refsect1> <refsect1 id="package.networking.net-ftp.net-ftp.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter><optional>string $host = null</optional></parameter> - The host to connect to ( either an IP adress or a domain name). </para> </listitem> <listitem> <para> <parameter><optional>int $port = null</optional></parameter> - The port to connect to on the server. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.net-ftp.return"> &title.returns; <para> <parameter>object</parameter> - the new FTP object. </para> </refsect1> <refsect1 id="package.networking.net-ftp.net-ftp.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.net-ftp.example"> &title.example; <example> <title>Using <function>Net_FTP</function></title> <programlisting role="php"> <![CDATA[ <?php require_once 'Net_FTP.php'; $test = new Net_FTP('ftp.mydomain.com', 21); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/put.xml +++ peardoc/en/package/networking/net-ftp/put.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.put"> <refnamediv> <refname>Net_FTP::put()</refname> <refpurpose>upload a file to the FTP server.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::put</function></funcdef> <paramdef> string <parameter>$local_file</parameter> </paramdef> <paramdef> string <parameter>$remote_file</parameter> </paramdef> <paramdef> bool <parameter><optional>$overwrite = false</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$mode = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.put.desc"> &title.desc; <para> This uploads a file to the FTP server from the computer your script runs on. </para> </refsect1> <refsect1 id="package.networking.net-finger.put.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $local_file</parameter> - The source file you'd like to upload. You can specify this with either an absolute path or a path relative to the scipts directory. (Beware: The script directory is determined by the called script, if you use includes!) </para> </listitem> <listitem> <para> <parameter>string $remote_file</parameter> - The path (including filename) you'd like to upload to. This could either be an absolute or relative path to a file (not a directory! see: <link linkend="package.networking.ftp.putRecursive">Net_FTP::putRecursive()</link>). </para> </listitem> <listitem> <para> <parameter><optional>bool $overwrite = false</optional></parameter> - Wether to overwrite the remote file, if it exists or not. if not set the file will not be overwritten. </para> </listitem> <listitem> <para> <parameter><optional>int $mode = null</optional></parameter> - This has to be one of the constants <constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>. if not specified, the class will try to determine the mode from the file extension (from extensions.ini) or fall back to the standard transfer mode (attribute). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.put.return"> &title.returns; <para> <parameter>mixed</parameter> - true on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.put.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Describtion</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Local file '$local_file' does not exist. </entry> <entry> The local file you specified does not exist. </entry> <entry> Correct the local file path. </entry> </row> <row> <entry> Remote file '$remote_file' exists and may not be overwriten. </entry> <entry> The specified remote file exists but may not be overwritten. </entry> <entry> Maybe you don't have the permission to overwrite the file. Check the filepermissions. </entry> </row> <row> <entry> File '$local_file' could not be uploaded to '$remote_file'. </entry> <entry> The upload of the local file failed. </entry> <entry> This may have several reasons: Maybe the local file does not exists or the remote directory you wanted to upload to does not exist or is not writeable. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.put.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.put.example"> &title.example; <example> <title>Using <function>put</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->put('/tmp/downloaded.zip', 'foo/bar.zip', true, FTP_BINARY)); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/putrecursive.xml +++ peardoc/en/package/networking/net-ftp/putrecursive.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.putrecursive"> <refnamediv> <refname>Net_FTP::putRecursive()</refname> <refpurpose>upload a whole directory to the FTP server.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::putrecursive</function></funcdef> <paramdef> string <parameter>$local_path</parameter> </paramdef> <paramdef> string <parameter>$remote_path</parameter> </paramdef> <paramdef> bool <parameter><optional>$overwrite = false</optional></parameter> </paramdef> <paramdef> int <parameter><optional>$mode = null</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.putrecursive.desc"> &title.desc; <para> This uploads a whole directory to the FTP server from the computer your script runs on. </para> </refsect1> <refsect1 id="package.networking.net-finger.putrecursive.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $local_path</parameter> - The source directory you'd like to upload. You can specify this with either an absolute path or a path relative to the scipts directory. (Beware: The script directory is determined by the called script, if you use includes!) </para> </listitem> <listitem> <para> <parameter>string $remote_path</parameter> - The path you'd like to upload to. This could either be an absolute or relative path to a directory. </para> </listitem> <listitem> <para> <parameter><optional>bool $overwrite = false</optional></parameter> - Wether to overwrite the remote directory, if it exists or not. if not set the directroy will not be overwritten. </para> </listitem> <listitem> <para> <parameter><optional>int $mode = null</optional></parameter> - This has to be one of the constants <constant>FTP_ASCII</constant> or <constant>FTP_BINARY</constant>. if not specified, the class will try to determine the mode from the file extensions (from extensions.ini) or fall back to the standard transfer mode (attribute). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.putrecursive.return"> &title.returns; <para> <parameter>mixed</parameter> - true on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.putrecursive.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Describtion</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Given local-path '$local_path' seems not to be a directory. </entry> <entry> The local path you have specified does not seem to be a directory. </entry> <entry> Correct the local directory path. (Does it end with '/'?) </entry> </row> <row> <entry> Given remote-path '$remote_path' seems not to be a directory. </entry> <entry> The remote path you have specified does not seem to be a directory. </entry> <entry> Correct the local directory path. (Does it end with '/'?) </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.putrecursive.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.putrecursive.example"> &title.example; <example> <title>Using <function>putrecursive</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->putRecursive('/tmp/foo/', 'foo/', true)); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/pwd.xml +++ peardoc/en/package/networking/net-ftp/pwd.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.pwd"> <refnamediv> <refname>Net_FTP::pwd()</refname> <refpurpose>returns the directory on the server you are currently in.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::pwd</function></funcdef> <paramdef></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.pwd.desc"> &title.desc; <para> Returns the directory currently selected on the server. </para> </refsect1> <refsect1 id="package.networking.net-ftp.pwd.return"> &title.returns; <para> <parameter>mixed</parameter> - path (absolute) as string on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.pwd.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Could not determine the actual path" will be returend if the opeartion fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.pwd.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.pwd.example"> &title.example; <example> <title>Using <function>pwd</function></title> <programlisting role="php"> <![CDATA[ <?php echo $test->pwd(); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/rm.xml +++ peardoc/en/package/networking/net-ftp/rm.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.rm"> <refnamediv> <refname>Net_FTP::rm()</refname> <refpurpose>deletes a file or directory.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::rm</function></funcdef> <paramdef> string <parameter><optional>$path = null</optional></parameter> </paramdef> <paramdef> string <parameter><optional>$recursive = false</optional></parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.rm.desc"> &title.desc; <para> This method deletes a file or a directory. </para> </refsect1> <refsect1 id="package.networking.net-finger.rm.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $path = null</parameter> - The file or directory to delete. In case you set the second parameter to true, directories will be deleted even if not empty. All files and directories inside will be deleted. </para> </listitem> <listitem> <para> <parameter><optional>$recursive = false</optional></parameter> - This parameter determines, wether a directory is deleted only if it's empty (standard) or if all included files and directories will be deleted with it ($recursive = true). </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.rm.return"> &title.returns; <para> <parameter>mixed</parameter> - true on success, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.rm.throws"> &title.throws; <para> Several errors maybe returned by mdtm. The errornumber is unspecific (until now) and will not tell you anything about the errormessage. Possible errors are: </para> <para> <table> <title>&title.throws.errortable;</title> <tgroup cols="3"> <thead> <row> <entry>Error message</entry> <entry>Describtion</entry> <entry>Solution</entry> </row> </thead> <tbody> <row> <entry> Could not delete file '$file'. </entry> <entry> The file named $file (complete path) could not be deleted. </entry> <entry> Either the file does not exist or you do not have the permission to delete it. So check if the file exists and you permissions on it. </entry> </row> <row> <entry> Directory name '$dir' is invalid, has to end with '/' </entry> <entry> You entered a directory for deletion ($recursive = true) without ending '/'. </entry> <entry> Correct your parameter. </entry> </row> <row> <entry> Could not delete directory '$dir'. </entry> <entry> The directory $dir could not be deleted. </entry> <entry> Maybe the directory is not empty ($recursive = false) or you do not have the permission to delete the directory. </entry> </row> </tbody> </tgroup> </table> </para> </refsect1> <refsect1 id="package.networking.net-ftp.rm.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.rm.example"> &title.example; <example> <title>Using <function>rm</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->rm('/foo/bar/', true)); ?> ]]> </programlisting> </example> </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 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 --> Index: peardoc/en/package/networking/net-ftp/size.xml +++ peardoc/en/package/networking/net-ftp/size.xml <!-- $Revision: 1.1 $ --> <refentry id="package.networking.net-ftp.size"> <refnamediv> <refname>Net_FTP::size()</refname> <refpurpose>returns the size in byte of a file.</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcsynopsisinfo> require_once 'Net/FTP.php'; </funcsynopsisinfo> <funcprototype> <funcdef>mixed <function>Net_FTP::size</function></funcdef> <paramdef> string <parameter>$file</parameter> </paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.networking.net-ftp.size.desc"> &title.desc; <para> gives you the size of a file either in byte. </para> </refsect1> <refsect1 id="package.networking.net-finger.size.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string $file</parameter> - The file to check. </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.networking.net-ftp.size.return"> &title.returns; <para> <parameter>mixed</parameter> - the size of the given on succes, otherwise PEAR::Error. </para> </refsect1> <refsect1 id="package.networking.net-ftp.size.throws"> &title.throws; <para> The returned &class.pear-error; object in case of an error is unspecific. You can ignore the errornumber and errormessage, because only "Connection failed" will be returend if the connection fails. </para> </refsect1> <refsect1 id="package.networking.net-ftp.size.note"> &title.note; &note.notstatic; </refsect1> <refsect1 id="package.networking.net-ftp.size.example"> &title.example; <example> <title>Using <function>size</function></title> <programlisting role="php"> <![CDATA[ <?php var_dump($test->size('/foo/bar')); ?> ]]> </programlisting> </example> </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 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 -->
« previous php.pear.doc (#1386) next »