PHP - URL displays fine in Chrome and IE8, but not in Firefox 3.0.11

孤者浪人 提交于 2019-12-11 16:51:12

问题


My site prints out URLs in a table. In Chrome and IE8, the URLs look great. In Firefox 3.0.11, the URLs only display up until the second forward slash.

So for example, "nytimes.com/pages/world/americas/index.html" is just "nytimes.com/pages" in Firefox.

Any ideas why? The code is below.

Edit: I'm beginning to think this is a CSS issue because when I remove my styles, the link displays correctly in Firefox. I'm going to re-post this as a CSS issue.

Thanks in advance,

John

print "<td class='sitename'>".'<a href="http://'.$row['site'].'" class="links2">'.$row['site'].'</a>'."</td>";

Edit: here is an HTML printout of a result:

<td class='sitename'><a href="http://en.wikipedia.org/wiki/Miami" class="links2">en.wikipedia.org/wiki/Miami</a></td>

In Firefox, it only displays "en.wikipedia.org/wiki"


回答1:


If you actually see only a part of the link, it means that your variable is bogus. It might be coming from previously posted data.




回答2:


Do you have any pages that demo this problem you can link to? I think you're at a point where people need to see this happening to get more ideas about what it might be.

There should be no reason this print statement produces any different HTML depending on your browser. I can only think that either your HTML is malformed in a way not evident here, or there's some CSS or Javascript issue particular to Firefox which is chopping a.link2 contents. As I doubt it's CSS, and you say your JavaScript doesn't touch this column of the table, we'll need more details to answer this problem for you.




回答3:


Just to make sure, and because some Firefox Add-ons do unpredictable behavior. Run Firefox in the safe mode, and check it.



来源:https://stackoverflow.com/questions/1060202/php-url-displays-fine-in-chrome-and-ie8-but-not-in-firefox-3-0-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!