这句在php得如何写才好?

WBOY
Release: 2016-06-23 13:31:34
Original
1004 people have browsed it

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

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


回复讨论(解决方案)

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

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

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

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

更好

echo "$Name";

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!