如何在网页上显示这些字符?
How can I show these characters on a webpage?
// An example to replace all newlines with their character equivalent $value = preg_replace('/[\r\n]+/', '\n', $value); echo htmlentities($value);
您能否不执行以下操作...
<?php echo "\n"."\n"; echo "\0"."\n"; echo "\t"."\n"; echo "\x0B"."\n"; echo "\r"."\n"; ?>
预期结果:
\n \0 \t \x0B \r
这应该只是打印到屏幕上,因为 \ 是网页上 \ 的引用。
\
编辑:
看起来 StackOverflow 会在未标记为代码时自动将 \ 更改为 \!
Can you not do the following...
Expected Result:
and that should just print to screen, since \ is the reference for a \ on web pages.
EDIT:
Looks like StackOverflow auto-changes \ to a \ when not marked as code!
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
您能否不执行以下操作...
预期结果:
这应该只是打印到屏幕上,因为
\
是网页上\
的引用。编辑:
看起来 StackOverflow 会在未标记为代码时自动将
\
更改为 \!Can you not do the following...
Expected Result:
and that should just print to screen, since
\
is the reference for a\
on web pages.EDIT:
Looks like StackOverflow auto-changes
\
to a \ when not marked as code!