Home  >  Article  >  Backend Development  >  php $_ENV为空的原因分析_PHP

php $_ENV为空的原因分析_PHP

WBOY
WBOYOriginal
2016-06-01 12:23:03791browse

但有些朋友的$_ENV是空的,可能是原因是:
你的php.ini的variables_order值为"GPCS",也就是说系统在定义PHP预定义变量时的顺序是GET,POST,COOKIES,SERVER,没有定义Environment(E),你可以修改php.ini文件的variables_order值为你想要的顺序,如:"EGPCS"。这时,$_ENV的值就可以取得了

EGPCS值(EGPCS是Environment、Get、Post、Cookies、Server的缩写 -- 这是PHP中外部变量来源的全部范围)

Statement:
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