[英]php - echo ascii characters?
I have a string of ascii characters, but I'd like to know how to echo that as shown on this site for example: 我有一串ascii字符,但例如,我想知道如何回显该字符,如本网站所示:
http://binsearch.info/viewNFO.php?oid=50662038&server= http://binsearch.info/viewNFO.php?oid=50662038&server=
I can convert it to png using some library I found but I can't figure out what header to use to echo it like that. 我可以使用找到的某些库将其转换为png,但是我不知道要使用哪个标头来回显它。
It's html, with the ASCII escaped using <pre>...</pre>
. 它是html,使用
<pre>...</pre>
转义了ASCII。 You can also just deliver the raw text using Content-Type: text/plain
, but then you'd lose control over font-size, etc. 您也可以使用
Content-Type: text/plain
交付原始文本,但是那样您将无法控制字体大小等。
What you're looking for is "ascii art". 您正在寻找的是“ ascii艺术”。 Googling for text to ascii art in php will help.
在php中搜索文本到ascii艺术将有所帮助。 Also, there's a very similar question right here on SO that recommends using figlet
另外, SO上有一个非常相似的问题 ,建议使用figlet
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.