php得到所有未知变量名和值
时间:2007-02-17 来源:PHP爱好者
################# You can copy this code to test #################
<FORM ENCTYPE="multipart/form-data" ACTION="<?php $PHP_SELF?>" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
Name: <input type="text" name="personal[name]"><br>
Email: <input type="text" name="email"><br>
Beer: <br>
<select multiple name="beer[]">
<option value="warthog">Warthog
<option value="guinness">Guinness
</select>
<input type="submit">
</FORM>
<?PHP
if ($HTTP_GET_VARS)
echo "HTTP_GET_VARS=" . implode(" | ",$HTTP_GET_VARS) . "<p>";
if ($HTTP_POST_VARS) {
echo "HTTP_POST_VARS=" . implode(" | ",$HTTP_POST_VARS) . "<p>";
$array = $HTTP_POST_VARS;
echo $array[0];
}
?>
################# http://php4u.yes8.com #################
php爱好者站 http://www.phpfans.net 为phper提供一切资讯.
<FORM ENCTYPE="multipart/form-data" ACTION="<?php $PHP_SELF?>" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
Name: <input type="text" name="personal[name]"><br>
Email: <input type="text" name="email"><br>
Beer: <br>
<select multiple name="beer[]">
<option value="warthog">Warthog
<option value="guinness">Guinness
</select>
<input type="submit">
</FORM>
<?PHP
if ($HTTP_GET_VARS)
echo "HTTP_GET_VARS=" . implode(" | ",$HTTP_GET_VARS) . "<p>";
if ($HTTP_POST_VARS) {
echo "HTTP_POST_VARS=" . implode(" | ",$HTTP_POST_VARS) . "<p>";
$array = $HTTP_POST_VARS;
echo $array[0];
}
?>
################# http://php4u.yes8.com #################
php爱好者站 http://www.phpfans.net 为phper提供一切资讯.
相关阅读 更多 +