Add an optional parameter to phpinfo() for html output in CLI SAPI
还没有人认领这个 Issue。
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.2k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
Every time exist more CLI app frameworks: amp, react, workerman, ...
And phpinfo(int $what = INFO_ALL): bool allways return an string output without HTML.
Every framework can create an html output, but I think that will be better return the same than in other SAPIs.
Now it's hardcoded in the C code the output.
Please add another parameter $html
phpinfo(int $what = INFO_ALL, $html = true): bool
Or add a option in php.ini, phpinfo.html=false , perhaps it's easier. By default for CLI will be false.
But will be changed easily for any CLI framework.
Thank you !!
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先在 C 代码中定位 CLI SAPI 硬编码的 phpinfo 输出,并将其与其他 SAPI 生成的 HTML 输出进行比较。确定该行为应使用可选参数还是 php.ini 设置,然后验证 CLI 调用方可以请求 HTML,同时现有默认行为保持不变。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- c, php
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100