我正在尝试在评论中添加超链接,以便它可以显示为图片。 继承人的代码
<img src=\"http://i.imgur.com/Iw26rST.png\" width=\"380px\" height=\"350px\">
如果我在评论框中发布它,我希望它像图片一样显示,但它显示为链接。 是否有网站的Java脚本问题,或者有任何调试软件使超链接运行。 TIA:D
答案 0 :(得分:1)
<img src="http://i.imgur.com/Iw26rST.png" width="380px" height="350px">
&#13;
答案 1 :(得分:0)
我的猜测是:您从网站或php文件中复制了此代码行,因此在In [40]: import subprocess
In [41]: subprocess.call(["c:/program files (x86)/git/bin/diff.exe", "-e", "c:/users/a.p/empty.py", "c:/users/a.p/.bashrc"])
alias l='ls -a'
alias ll='ls -la'
alias ipy='ipython'
.
Out[41]: 1
之前\
"
在简单的html中你必须这样做:
<img src=\"http://i.imgur.com/Iw26rST.png\" width=\"380px\" height=\"350px\">
为什么PHP的区别?这是因为下面的例子:
在php中你可以回显html代码。如果你没有在下面的引文之前加上反斜杠,你可能会遇到魔术引号的问题。 Read more here - backslash problem
<img src="http://i.imgur.com/Iw26rST.png" width="380px" height="350px">
因此在php中,正确的写法是你写的
<?php
echo "<img src="http://i.imgur.com/Iw26rST.png" width="380px" height="350px">"
//this can cause problems in php
?>