我可以将$ _GET参数传递给本地运行的脚本吗?

Dmi*_*aev 3 php shell command-line

我正在尝试从命令行启动:

$ /usr/bin/php -f "index.php?refresh_words=1"
Could not open input file: index.php?refresh_words=1
Run Code Online (Sandbox Code Playgroud)

当然,没有?refresh_words=1它运行正常.我可以从命令行传递$ _GET参数吗?

Mar*_*ski 7

你不能这样做.使用argvargc.请参阅手册中的命令行用法部分