cvs: phpdoc /en/reference/ftp/functions ftp-exec.xml

From: Date: Sun, 16 Apr 2006 11:49:21 +0000
Subject: cvs: phpdoc /en/reference/ftp/functions ftp-exec.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969372695@lists.php.net to get a copy of this message
leszek Sun Apr 16 11:49:21 2006 UTC Modified files: /phpdoc/en/reference/ftp/functions ftp-exec.xml Log: - example unification http://cvs.php.net/viewcvs.cgi/phpdoc/en/reference/ftp/functions/ftp-exec.xml?r1=1.12&r2=1.13&diff_format=u Index: phpdoc/en/reference/ftp/functions/ftp-exec.xml diff -u phpdoc/en/reference/ftp/functions/ftp-exec.xml:1.12 phpdoc/en/reference/ftp/functions/ftp-exec.xml:1.13 --- phpdoc/en/reference/ftp/functions/ftp-exec.xml:1.12 Sun Jan 16 05:09:23 2005 +++ phpdoc/en/reference/ftp/functions/ftp-exec.xml Sun Apr 16 11:49:21 2006 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12 $ --> +<!-- $Revision: 1.13 $ --> <refentry id='function.ftp-exec'> <refnamediv> <refname>ftp_exec</refname> @@ -56,18 +56,25 @@ <![CDATA[ <?php +// variable initialization $command = 'ls -al >files.txt'; +// set up basic connection $conn_id = ftp_connect($ftp_server); +// login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); +// execute command if (ftp_exec($conn_id, $command)) { - echo "$command executed successfully<br />\n"; + echo "$command executed successfully\n"; } else { - echo 'could not execute ' . $command; + echo "could not execute $command\n"; } +// close the connection +ftp_close($conn_id); + ?> ]]> </programlisting>

« previous php.doc (#969372695) next »