发现脚本中 /user/bin/php -qd open_dir=/
查手册,d define,用该参数可以自行设置任何可以在 php.ini 文件中设置的配置选项的值,其语法为:
-d configuration_directive[=value] # 取值部分被省略,将会把配置选项设为 "1"
$ php -d max_execution_time -r '$foo = ini_get("max_execution_time"); var_dump($foo);' string(1) "1"
# 取值部分为空白,将会把配置选项设为 ""
php -d max_execution_time= -r '$foo = ini_get("max_execution_time"); var_dump($foo);' string(0) ""
# 配置选项将被设置成为任何 '=' 字符之后的值 $ php -d max_execution_time=20 -r '$foo = ini_get("max_execution_time"); var_dump($foo);' string(2) "20"
$ php -d max_execution_time=doesntmakesense -r '$foo = ini_get("max_execution_time"); var_dump($foo);' string(15) "doesntmakesense
但是,q 参数没有,网上资料也找不到,查源码:
{'q', 0, "no-header"}, /* for compatibility with CGI (do not generate HTTP headers) */
不产生HTTP headers, 由于时间关系没有实际测试。
立即学习“PHP免费学习笔记(深入)”;
做笔记。
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号