php?$_REQUEST

WBOY
Release: 2016-06-20 12:52:00
Original
1068 people have browsed it

<?php$_GET['foo'] = 'a';$_POST['bar'] = 'b';var_dump($_GET);var_dump($_POST);echo "<br>";var_dump($_REQUEST); // 内容没有包含 'foo' or 'bar'?>
Copy after login

$_REQUEST ? HTTP Request 变量 说明 默认情况下包含了 $_GET,$_POST 和 $_COOKIE 的数组。
var_dump($_REQUEST); // 内容没有包含 'foo' or 'bar'?


回复讨论(解决方案)

$_REQUEST、$_GET、$_POST 保存的都是传入的数据
在代码中赋值的不算

 这个测试告诉我们request是php初始化的独立变量,并非实时从get或post变量读取

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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template