在PHP中回显JavaScript链接 [英] echo a javascript link in php

查看:110
本文介绍了在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>


这篇关于在PHP中回显JavaScript链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆