Home > php教程 > php手册 > body text

为什么不能获取PHP表单变量的

WBOY
Release: 2016-06-13 10:27:33
Original
1035 people have browsed it

如果大家使用PHP4.2版本或者以上的请看这里。 设置register_globals = on 或者 加入以下代码: // allow script to work with registerglobals off if ( function_exists(ini_get) ) { $onoff = ini_get(register_globals); } else { $onoff = get_cfg_var(register_globals); } if ($onoff != 1) { @extract($HTTP_SERVER_VARS, EXTR_SKIP); @extract($HTTP_COOKIE_VARS, EXTR_SKIP); @extract($HTTP_POST_FILES, EXTR_SKIP); @extract($HTTP_POST_VARS, EXTR_SKIP); @extract($HTTP_GET_VARS, EXTR_SKIP); @extract($HTTP_ENV_VARS, EXTR_SKIP); } 详细参考这里: http://www.21php.com/tutorial/tutorial.php?tid=21 相关讨论请看这里: http://www.21php.com/forums/showthread.php?s=&postid=588#post588 http://www.21php.com/forums/showthread.php?s=&postid=400#post400

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!