Home > php教程 > php手册 > 我想写一个通用的PHP脚本来处理任何传进来的表单F

我想写一个通用的PHP脚本来处理任何传进来的表单F

WBOY
Release: 2016-06-13 09:54:05
Original
831 people have browsed it

确定track_vars在你php3.ini文件中。如果你在编译PHP时加上"--enable-track-vars",肯定就有了。你要在下面二种方式中选择一种:在编译时加入;或是在每个脚本的第一行加入 字符串。当track_vars打开时,会建立三个数组: $HTTP_GET_VARS、$HTTP_POST_VARS 和 $HTTP_COOKIE_VARS。因此,建立通用的 POST方法脚本,可以用下面的程序:
while (list($var, $value) = each($HTTP_POST_VARS))
{ echo "$var = $value
n"; }

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template