搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

PHP Script works in Chrome, IE9 but not in Firefox 15

more options

This page is a PHP script for creating hyperlinks to all files in a directory:

http://www.checktheevidence.co.uk/audio/index.php?dir=&sort=date&order=desc

It works fine in IE9 and Chrome, but Firefox "give up" about 3/4 way down the listing the hyperlinks for the files are no longer shown. Weird stuff.

This issue has been present for a long time

This page is a PHP script for creating hyperlinks to all files in a directory: http://www.checktheevidence.co.uk/audio/index.php?dir=&sort=date&order=desc It works fine in IE9 and Chrome, but Firefox "give up" about 3/4 way down the listing the hyperlinks for the files are no longer shown. Weird stuff. This issue has been present for a long time

被采纳的解决方案

Thank you very much for those kind responses! I will mod the PHP (I didn't write the original though) and copy it back onto the server!

定位到答案原位置 👍 0

所有回复 (3)

more options

That is probably because the <strong> tags aren't closed.
You can see that Firefox sees the closing </a> as an error by displaying it in red if you inspect the page source and closes and reopen the strong tags.
You will have to make sure to close all tags properly.

Page Source:

<div><a href="Victoria Derbyshire Cuts off Police Constable talking about The Club in the Police - Radio 5 Live - 13 Sep 2012.mp3" class="w"><strong>Victoria Derbyshire Cuts off Police Constable talking about The Club in the Police - Radio 5 Live - 13 Sep 2012.mp3 </a>   (1.5 MB) (Modified:  Sep 17 2012 11:06:37 PM)</div>

DOM generated source:

<div><a href="Victoria Derbyshire Cuts off Police Constable talking about The Club in the Police - Radio 5 Live - 13 Sep 2012.mp3" class="w"><strong>Victoria Derbyshire Cuts off Police Constable talking about The Club in the Police - Radio 5 Live - 13 Sep 2012.mp3 </strong></a><strong>   (1.5 MB) (Modified:  Sep 17 2012 11:06:37 PM)</strong></div><strong>
<div><a href="Andrew Johnson - 911 - Lloyd Pye - Hominoids &amp; Starchild - Planet X - City Talk FM - 16 Sep 2012.mp3" class="b"><strong>Andrew Johnson - 911 - Lloyd Pye - Hominoids &amp; Starchild - Planet X - City Talk FM - 16 Sep 2012.mp3 </strong></a><strong>   (40.6 MB) (Modified:  Sep 17 2012 10:32:24 PM)</strong></div><strong>
more options

It's not pretty, is it. The problem is that your page opens <strong> tags without closing them. For example:

<div>
 <a href="Victoria Derbyshire Cuts off Police Constable talking about The Club in the Police - Radio 5 Live - 13 Sep 2012.mp3" class="w"><strong>Victoria Derbyshire Cuts off Police Constable talking about The Club in the Police - Radio 5 Live - 13 Sep 2012.mp3 </a>
 (1.5 MB) (Modified:  Sep 17 2012 11:06:37 PM)
</div>

This causes Firefox to "nest" tags in the page past a maximum depth. After that point, it just dumps text to the page. Similar/related past threads:

So just a small fix to your PHP and you should be good to go.

more options

选择的解决方案

Thank you very much for those kind responses! I will mod the PHP (I didn't write the original though) and copy it back onto the server!