CVS update: phpdoc/chapters
| From: | jim | Date: | Sat, 19 Jun 1999 00:43:17 +0000 |
| Subject: | CVS update: phpdoc/chapters | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7122@lists.php.net to get a copy of this message | ||
Date: Friday June 18, 1999 @ 20:43
Author: jim
Update of /repository/phpdoc/chapters
In directory php:/tmp/cvs-serv12213/chapters
Modified Files:
features.sgml lang-syntax.sgml
Log Message:
Get up to date with php3 docs.
Index: phpdoc/chapters/features.sgml
diff -u phpdoc/chapters/features.sgml:1.1.1.1 phpdoc/chapters/features.sgml:1.2
--- phpdoc/chapters/features.sgml:1.1.1.1 Sun Jun 6 14:50:35 1999
+++ phpdoc/chapters/features.sgml Fri Jun 18 20:43:17 1999
@@ -246,6 +246,49 @@
starting at the first whitespace in the content-type mime header
it gets from the client. As long as this is the case, CERN httpd
will not support the file upload feature.
+
+ <sect2 id="feature-fileupload.multiple">
+ <title>Uploading multiple files</title>
+ <simpara>
+ As of PHP 3.0.10, it is possible to upload multiple files
+ simultaneously and have the information organized automatically
+ in arrays for you. To do so, you need to use the same array
+ submission syntax in the HTML form as you do with multiple
+ selects and checkboxes:
+
+ <para>
+ <example>
+ <title>Uploading multiple forms</title>
+ <programlisting>
+<form action="file-upload.html" method="post"
enctype="multipart/form-data">
+ Send these files:<br>
+ <input name="userfile[]"
type="file"><br>
+ <input name="userfile[]"
type="file"><br>
+ <input type="submit" value="Send files">
+</form>
+ </programlisting>
+ </example>
+
+ <simpara>
+ When the above form is submitted, the arrays
<computeroutput>$userfile</computeroutput>,
+ <computeroutput>$userfile_name</computeroutput>, and
+ <computeroutput>$userfile_size</computeroutput> will be formed in the global
+ scope (as well as in $HTTP_POST_VARS). Each of these will be a
+ numerically indexed array of the appropriate values for the
+ submitted files.
+
+ <simpara>
+ For instance, assume that the filenames
+ <filename>/home/test/review.html</filename> and
+ <filename>/home/test/xwp.out</filename> are submitted. In this
+ case, <computeroutput>$userfile_name[0]</computeroutput> would contain
+ the value <computeroutput>review.html</computeroutput>, and
+ <computeroutput>$userfile_name[1]</computeroutput> would contain the
+ value <computeroutput>xwp.out</computeroutput>. Similarly,
+ <computeroutput>$userfile_size[0]</computeroutput> would contain
+ <filename>review.html</filename>'s filesize, and so forth.
+ </sect2
+
</sect1>
<sect1 id="feature-putsupport">
Index: phpdoc/chapters/lang-syntax.sgml
diff -u phpdoc/chapters/lang-syntax.sgml:1.1.1.1 phpdoc/chapters/lang-syntax.sgml:1.2
--- phpdoc/chapters/lang-syntax.sgml:1.1.1.1 Sun Jun 6 14:50:39 1999
+++ phpdoc/chapters/lang-syntax.sgml Fri Jun 18 20:43:17 1999
@@ -826,24 +826,24 @@
exponent. The exponent is an 'e' or 'E' followed by one or more
digits.
+ <simpara>
+ When the first expression is a string, the type of the variable
+ will depend on the second expression.
+
<informalexample>
<programlisting>
-$foo = 1 + "10.5"; // $foo is double (11.5)
-$foo = 1 + "-1.3e3"; // $foo is double (-1299)
-$foo = 1 + "bob-1.3e3"; // $foo is integer (1)
-$foo = 1 + "bob3"; // $foo is integer (1)
+$foo = 1 + "10.5"; // $foo is double (11.5)
+$foo = 1 + "-1.3e3"; // $foo is double (-1299)
+$foo = 1 + "bob-1.3e3"; // $foo is integer (1)
+$foo = 1 + "bob3"; // $foo is integer (1)
$foo = 1 + "10 Small Pigs"; // $foo is integer (11)
-$foo = 1 + "10 Little Piggies"; // $foo is integer (11);
-$foo = "10.0 pigs " + 1; // $foo is int (11)
+$foo = 1 + "10 Little Piggies"; // $foo is integer (11)
+$foo = "10.0 pigs " + 1; // $foo is integer (11)
$foo = "10.0 pigs " + 1.0; // $foo is double (11)
</programlisting>
</informalexample>
<simpara>
- The type of the variable depends on the second not on the first
- expression, when the first expression is a string.
-
- <simpara>
For more information on this conversion, see the Unix manual
page for strtod(3).
</sect1>
@@ -1997,8 +1997,9 @@
<title><literal>continue</literal></title>
<para>
- <literal>continue</literal> jumps to the beginning of enclosing the looping
- construct.
+ <literal>continue</literal> is used within looping structures to
+ skip the rest of the current loop iteration and continue
+ execution at the beginning of the next iteration.
<informalexample>
<programlisting>