您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php cli 参数

2025/3/26 9:31:26发布23次查看
发现脚本中 /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, 由于时间关系没有实际测试。
做笔记。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product