php 搞乱了链接
我正在尝试创建一个链接,如下所示:
<a href="http://www.facebook.com/sharer.php?u=<?= $linkAddress ?>&t<?= $message ?>">
但是,当我单击该链接时,它会将我带到正确的 URL,但前面是:
http://pal.sandbox.dev.co.uk/go/music/artists/profile/show/ext/_auto/-/
这是(接近)我刚刚来自的页面的地址。任何人都知道为什么会发生这种情况?
澄清一下:
生成的 html 是:
<a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.bbc.co.uk%2Fprogrammes%2Fp001d7pg&t=My+music+was+broadcast">
但是单击此链接会将用户带到以下地址:
http://pal.sandbox.dev.co.uk/go/music/artists/profile/show/ext/_auto/-/http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.abc.co.uk%2Fprogrammes%2Fp001d7pg&t=My+music+was+broadcast
I'm trying to create a link as follows:
<a href="http://www.facebook.com/sharer.php?u=<?= $linkAddress ?>&t<?= $message ?>">
however, when I click the link, it takes me to the correct URL, but preceeded with:
http://pal.sandbox.dev.co.uk/go/music/artists/profile/show/ext/_auto/-/
which is (close to) the address of the page I've just come from. Anyone have any ideas why this might be happening?
to clarify:
the html generated is:
<a href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.bbc.co.uk%2Fprogrammes%2Fp001d7pg&t=My+music+was+broadcast">
but clicking this link takes the user to the address:
http://pal.sandbox.dev.co.uk/go/music/artists/profile/show/ext/_auto/-/http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.abc.co.uk%2Fprogrammes%2Fp001d7pg&t=My+music+was+broadcast
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我发现这是由 javascript 而不是 php 引起的(禁用 javascript 可以解决问题)。不幸的是,我还没有编写这个网站的任何 JavaScript,所以我必须仔细研究它以寻找错误。
I've worked out that this is caused by javascript not php (disabling javascript fixes the problem). I haven't written any of this site's javascript, unfortunately, so will have to trawl through it looking for bugs..
我确信您现在已经解决了这个问题,但这就是所谓的“跟踪”。这是 BBC 内部事务,因此如果您需要帮助,请通过 IRC 中的 #frameworks 询问。
I'm sure you've worked this out by now but this is something called go tracking. It's an internal BBC thing so come and ask in #frameworks in IRC if you need help.