开发者

Suggestions for why this html object would work on my computer, but not on my web host?

Seems simple enough, but I'm completely stuck. The following code works on my computer, but not on my host(siteground):

<html>
<body>
<object type="audio/mpeg" data="01.mp3"></object>
</body>
</html>

The mp3 lives in same folder. I've tried using its entire address (www.myurl.com/01.mp3), and moving it to a different directory. I also thought the problem could be with permissions- I've tried changing those but the issue persists.

I feel as though I am missing something simple or obvious. Is it the way siteground is configured? I'm just looking for leads here.

EDIT:

On my mac, the page loads as just a quicktime symbol with a question mark over it.

EDIT 2:

In case anyone stumbles across this looking for guidance, this appears to be an issue with Safari 5 on snow leopard only: see the discussion here.

The only fix I can find is to actually re-encode the mp3 using LAME!

It also appears to not persist across every web host, but I can verify both siteground and godaddy.

So anyway, this really isn't a programming issue, but a bug in safari. The weird thing is that it works if you load the page locally- the issue has to be with the way something 开发者_运维知识库in that server works with safari 5's MIME types.


Your safest bet would be to put down the full path to the file. If you want to link to it the way you are, try "/01.mp3"


Can you access the mp3 file you uploaded? e.g. change that to

<a href="01.mp3">link</a>

and work from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜