Home  >  Article  >  Backend Development  >  接受的项目代码有关问题

接受的项目代码有关问题

WBOY
WBOYOriginal
2016-06-13 12:26:55988browse

接受的项目代码问题
代码如下

<br />$str .= $ok ? "\033[0;32;40m OK \033[0m " : "\033[0;31;40m ERROR \033[0m ";


这种写法是什么意思,想做什么?
------解决思路----------------------
https://code.google.com/p/conemu-maximus5/wiki/AnsiEscapeCodes
详细介绍了AnsiEscapeCodes,主要负责终端的输出效果。

30m  黑色(前景色)
31m  红色(前景色)
32m  绿色(前景色)
33m  黄色(前景色)
34m  蓝色(前景色)
35m  紫色(前景色)
36m  深绿色(前景色)
37m  白色(前景色)
40m  黑色(背景色)
41m  红色(背景色)
42m  绿色(背景色)
------解决思路----------------------
一般情况下,是将内容打到哪里,然后在linux下查看,会有颜色,高亮等提示。

比如日志,就可以这样用,分析日志、查看等,都很方便。

Statement:
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