Home Backend Development PHP Tutorial 为什么不能获取PHP表单变量的?_PHP

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

Jun 01, 2016 pm 12:40 PM
cannot Why variable Obtain

如果大家使用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

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

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to fine-tune deepseek locally How to fine-tune deepseek locally Feb 19, 2025 pm 05:21 PM

How to fine-tune deepseek locally

deepseek why can't you log in deepseek login portal deepseek why can't you log in deepseek login portal Feb 19, 2025 pm 05:00 PM

deepseek why can't you log in deepseek login portal

Why can't the Bybit exchange link be directly downloaded and installed? Why can't the Bybit exchange link be directly downloaded and installed? Feb 21, 2025 pm 10:57 PM

Why can't the Bybit exchange link be directly downloaded and installed?

Free market software app website Free market software app website Mar 05, 2025 pm 09:03 PM

Free market software app website

Why is Bittensor said to be the 'bitcoin' in the AI ​​track? Why is Bittensor said to be the 'bitcoin' in the AI ​​track? Mar 04, 2025 pm 04:06 PM

Why is Bittensor said to be the 'bitcoin' in the AI ​​track?

gateio exchange app old version gateio exchange app old version download channel gateio exchange app old version gateio exchange app old version download channel Mar 04, 2025 pm 11:36 PM

gateio exchange app old version gateio exchange app old version download channel

Bitcoin: The 'barometer' of global liquidity? Bitcoin: The 'barometer' of global liquidity? Mar 04, 2025 pm 06:39 PM

Bitcoin: The 'barometer' of global liquidity?

BitMEX: Best option strategy after a big sell-off BitMEX: Best option strategy after a big sell-off Mar 04, 2025 pm 06:27 PM

BitMEX: Best option strategy after a big sell-off

See all articles