开发者

How do I embedd an audio player in a PHP page? [closed]

开发者 https://www.devze.com 2022-12-10 06:44 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 13 years ago.

I am begginer to PHP, MySQL, and JavaScript develop开发者_如何学编程ement. I have one link by the name 49(doc file),and audio file name 49(mp3file name). I'd like the audio file to play one time when the link to the doc file is clicked. Is this possible?


You can embed doc files in IFrame's, if Office is installed on the client's computer, I think. However that is a terrible solution either way. If it has to be a document, make it a PDF so most of your users can view it.

As for an MP3, you can use the Easy Musicplayer for Flash to set up a playing facility. It has an autostart function so you might be able to put together a mechanism that allows the mp3 start at the same time the user clicks on a link.

Maybe, though, there is a better solution for your task. Post more details, somebody will probably come up with a HTML based solution.

Other than that, accepting a dead line in a line of work you don't know nothing about is never clever.


This is my take on your question. If I'm not right, try rephrasing the question (edit the question, don't post a duplicate).

Sounds like you have two links that are being served up by a php file:

<a href="download.php?file-name=49.doc">49.doc</a>
<a href="download.php?file-name=49.mp3">49.mp3</a>

And when you click on the Mp3, it doesn't play?

If so, then you'll want to read about the Content-type HTTP header (look at php's header() function). Web browsers use the file's content type to determine what kind of file it is.

Is this a homework question?

0

精彩评论

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