在PHP中回显JavaScript链接

问题描述:

我正在尝试在PHP驱动的网站上发布指向javascript弹出窗口的链接.我有一个代码段,但始终会收到语法错误,意外的T_CONSTANT_ENCAPSED_STRING"错误.谁能帮我吗?




< pre>


< pre lang ="xml"> $ File2 =& quot; feed.html& quot ;;
$ msg2 ="用户已上传文件.要查看它,请单击& lt; a
href =&#39; javascript:download(&#39; http://www.somesite.com/somefile/1/files/& quot; $ filename.
&#39;)"&#39;&</a& quot;</pre>


</pre>

I am trying to post a link to a javascript popup on my PHP driven website. I have a code snippet, but always receive "syntax error, unexpected T_CONSTANT_ENCAPSED_STRING" error. Can anyone help me?




<pre>


<pre lang="xml">$File2 = &quot;feed.html&quot;;
$msg2 = &quot;A user has uploaded a file. To view it click &lt;a
href=&#39;javascript:download(&#39;http://www.somesite.com/somefile/1/files/&quot; . $filename .
&#39;)&quot;&#39;&gt;Here&lt;/a&gt;&quot;;</pre>


</pre>

File2 =& quot; feed.html& quot ;;
File2 = &quot;feed.html&quot;;


msg2 ="用户已上传文件.要查看它,请单击& lt; a
href =&#39; javascript:download(&#39; http://www.somesite.com/somefile/1/files/& quot ;.
msg2 = &quot;A user has uploaded a file. To view it click &lt;a
href=&#39;javascript:download(&#39;http://www.somesite.com/somefile/1/files/&quot; .


文件名.
&#39;)"&#39;& quot;/a& quot;</pre>


</pre>
filename .
&#39;)&quot;&#39;&gt;Here&lt;/a&gt;&quot;;</pre>


</pre>