From 3b5d36de26b466f543a279e71098346a9b0e66fc Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Sun, 17 Aug 2003 13:14:23 +0000 Subject: [PATCH] adding examples proposed by vincent at php dot net git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@138087 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/ftp/functions/ftp-exec.xml | 27 +++++++++++++++++++++- reference/ftp/functions/ftp-fput.xml | 33 ++++++++++++++++++++++++++- reference/ftp/functions/ftp-get.xml | 32 +++++++++++++++++++++++++- reference/ftp/functions/ftp-mdtm.xml | 33 ++++++++++++++++++++++++++- reference/ftp/functions/ftp-rmdir.xml | 27 +++++++++++++++++++++- reference/ftp/functions/ftp-size.xml | 30 +++++++++++++++++++++++- 6 files changed, 176 insertions(+), 6 deletions(-) diff --git a/reference/ftp/functions/ftp-exec.xml b/reference/ftp/functions/ftp-exec.xml index cac8d775e4..657c4e07d7 100644 --- a/reference/ftp/functions/ftp-exec.xml +++ b/reference/ftp/functions/ftp-exec.xml @@ -1,5 +1,5 @@ - + @@ -18,6 +18,31 @@ server. Returns &true; if the command was successful (server sent response code: 200); otherwise returns &false;. + + + <function>ftp_exec</function> example + +\n"; + echo nl2br($res); +} else { + echo 'could not execute ' . $command; +} + +?> +]]> + + + See also ftp_raw. diff --git a/reference/ftp/functions/ftp-fput.xml b/reference/ftp/functions/ftp-fput.xml index 64d6e3602d..e33f9c9342 100644 --- a/reference/ftp/functions/ftp-fput.xml +++ b/reference/ftp/functions/ftp-fput.xml @@ -1,5 +1,5 @@ - + @@ -23,6 +23,37 @@ mode specified must be either FTP_ASCII or FTP_BINARY. + + + <function>ftp_fput</function> example + + +]]> + + + The startpos parameter was added in PHP 4.3.0. diff --git a/reference/ftp/functions/ftp-get.xml b/reference/ftp/functions/ftp-get.xml index 6c018bd43f..a1679e014a 100644 --- a/reference/ftp/functions/ftp-get.xml +++ b/reference/ftp/functions/ftp-get.xml @@ -1,5 +1,5 @@ - + @@ -31,6 +31,36 @@ &return.success; + + + <function>ftp_get</function> example + + +]]> + + + See also ftp_fget, ftp_nb_get and ftp_nb_fget. diff --git a/reference/ftp/functions/ftp-mdtm.xml b/reference/ftp/functions/ftp-mdtm.xml index 378013241f..14b069e3a3 100644 --- a/reference/ftp/functions/ftp-mdtm.xml +++ b/reference/ftp/functions/ftp-mdtm.xml @@ -1,5 +1,5 @@ - + @@ -21,6 +21,37 @@ Returns a UNIX timestamp on success, or -1 on error. + + + + + +]]> + + + Not all servers support this feature! diff --git a/reference/ftp/functions/ftp-rmdir.xml b/reference/ftp/functions/ftp-rmdir.xml index 769d5753d6..fc02e48333 100644 --- a/reference/ftp/functions/ftp-rmdir.xml +++ b/reference/ftp/functions/ftp-rmdir.xml @@ -1,5 +1,5 @@ - + @@ -21,6 +21,31 @@ &return.success; + + + <function>ftp_rmdir</function> example + + +]]> + + + See also ftp_mkdir. diff --git a/reference/ftp/functions/ftp-size.xml b/reference/ftp/functions/ftp-size.xml index 7b029ea39d..28e3290203 100644 --- a/reference/ftp/functions/ftp-size.xml +++ b/reference/ftp/functions/ftp-size.xml @@ -1,5 +1,5 @@ - + @@ -22,6 +22,34 @@ Returns the file size on success, or -1 on error. + + + <function>ftp_size</function> example + + +]]> + + + See also ftp_rawlist.