为什么 $_REQUEST 是空的 [英] why is $_REQUEST empty

查看:43
本文介绍了为什么 $_REQUEST 是空的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有带有 apache2、php 5.3.3-1 和 mysql 5.1 的 Ubuntu 10.10.

I have Ubuntu 10.10 with apache2, php 5.3.3-1 and mysql 5.1.

我正在通过 URL 向页面传递一些值.在该页面上,如果我执行 print_r($_GET),那么我会看到数组内容.但是如果我这样做 print_r($_REQUEST) 数组是空的.任何想法为什么会这样?

I am passing some values to a page via URL. On that page, if I do print_r($_GET), then I see the array contents. But if I do print_r($_REQUEST) the array is empty. Any ideas why this could be?

推荐答案

也试试检查 "request_order" php.ini 中的选项:

Also try check "request_order" option in php.ini:

; This directive determines which super global data (G,P,C,E & S) should
; be registered into the super global array REQUEST. If so, it also determines
; the order in which that data is registered. The values for this directive are
; specified in the same manner as the variables_order directive, EXCEPT one.
; Leaving this value empty will cause PHP to use the value set in the
; variables_order directive. It does not mean it will leave the super globals
; array REQUEST empty.
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"
; http://php.net/request-order
request_order = "GP"

这篇关于为什么 $_REQUEST 是空的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆