echo中的PHP链接
我有下面的回音,我需要在其中链接,但我得到一个意外的T_字符串在那一行与链接,它说期待','或';' 代码是:echo中的PHP链接,php,text,hyperlink,echo,Php,Text,Hyperlink,Echo,我有下面的回音,我需要在其中链接,但我得到一个意外的T_字符串在那一行与链接,它说期待','或';' 代码是: echo " You Are Now A User Of ClipBoy! Drag the image below to your bookmarks bar for easy access to your site! To get to your site go to <a href"http://themacsplash.co
echo " You Are Now A User Of ClipBoy!
Drag the image below to your bookmarks bar for easy access to your site!
To get to your site go to
<a href"http://themacsplash.com/ClipBoy/userfiles/$myUser" target "_blank">
http://themacsplash.com/ClipBoy/userfiles/$myUser</a>";
echo“您现在是剪贴簿的用户!
将下面的图像拖动到书签栏,以便轻松访问您的网站!
要访问您的站点,请访问
";
如何修复此问题?对字符串中的双引号进行转义,如下面的
\“
因此,它变成:
echo " You Are Now A User Of ClipBoy!
Drag the image below to your bookmarks bar for easy access to your site!
To get to your site go to
<a href=\"http://themacsplash.com/ClipBoy/userfiles/$myUser\" target=\"_blank\">
http://themacsplash.com/ClipBoy/userfiles/$myUser</a>";
echo“您现在是剪贴簿的用户!
将下面的图像拖动到书签栏,以便轻松访问您的网站!
要访问您的站点,请访问
";
您必须转义双引号您需要用\”转义“
”
尝试以下方法:
echo ' You Are Now A User Of ClipBoy! Drag the image below to your bookmarks bar for easy access to your site! To get to your site go to <a href="http://themacsplash.com/ClipBoy/userfiles/'.$myUser.'" target="_blank">http://themacsplash.com/ClipBoy/userfiles/'.$myUser.'</a>';
echo“您现在是剪贴簿的用户!将下面的图像拖动到书签栏,以便轻松访问您的网站!要访问您的网站,请转到”;
或:
echo“您现在是剪贴簿的用户!将下面的图像拖动到书签栏,以便轻松访问您的网站!要访问您的站点,请转到“;
href=\”http://... 别忘了属性和它的值之间的=It’我们的朋友Will一直在问同样的问题……请你给我一个样本,因为我不知道把它们放在哪里。谢谢请你给我一个样品,因为我不知道放在哪里。谢谢@威尔·埃文斯。我已经给你一个样品了!另外,我很好奇,你真的是个程序员吗?
echo " You Are Now A User Of ClipBoy! Drag the image below to your bookmarks bar for easy access to your site! To get to your site go to <a href=\"http://themacsplash.com/ClipBoy/userfiles/$myUser\" target=\"_blank\">http://themacsplash.com/ClipBoy/userfiles/$myUser</a>";