Home > Backend Development > PHP Tutorial > PHP $_SERVER['argv' ] 出现notice

PHP $_SERVER['argv' ] 出现notice

WBOY
Release: 2016-06-23 14:22:59
Original
940 people have browsed it

php $_SERVER[argv]

http://localhost/demo/demo.php?a=123&b=132
输出出现:
Notice: Undefined index: args in F:\php\www\demo\demo.php on line 35

这是怎么回事呀,请明白人指点

回复讨论(解决方案)

$_SERVER['argv'] 用于 cli 方式下获取命令行参数
$_GET 才是用于获取 url 参数的

嗯,谢谢了,刚刚查到一个
http://stackoverflow.com/questions/9270030/serverargv-with-http-get-and-cli-issue
有点明白了,英语不中

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