Home  >  Article  >  Backend Development  >  这句在php得如何写才好?

这句在php得如何写才好?

WBOY
WBOYOriginal
2016-06-23 13:31:341005browse

response.write "" &Name& ""
是asp的,如果要写为php得如何写?

echo"....不知道里面的符号得怎么写。。求高手"


回复讨论(解决方案)

"" 是 asp 中转义 " 的写法,php 要写作  \"
& 是 asp 的字符串连接符,php 的是  .

response.write "" &Name& ""
直译为

echo "<a href='javascript:downurl(\"/downurl/?url=" . $flv . "\");'>" . $Name . "</a>";

结合 php 的特点,翻译成
echo "<a href='javascript:downurl(\"/downurl/?url=$flv\");'>$Name</a>";

更好

echo "$Name";

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