简体   繁体   中英

I upgraded to php 7 and the superglobal request is empty

I updated from PHP 5.6 to PHP 7.

every $_REQUEST['some_var'] I do returns an error that it is not set...

is it normal that $_REQUEST is empty ?

Example :

echo $_REQUEST['login_ID']

returns

Notice: Undefined index: login_ID in

Check your php.ini file for request_order . Possible it is not set correctly.

http://php.net/manual/en/ini.core.php#ini.request-order

; 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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM