Jump to content

Embed Media Outside Root Directory


Lytheum

Recommended Posts

How can I embed media that is located outside of my root directory?

 

For instance:

 

Public_html is my root, where "play.php" is located...

'Songs' is located up one directory from root.

 

In play.php,

 

<object id=mediaPlayer
codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
type=application/x-oleobject height=45 width=300 align=absmiddle
classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
<param name="FileName" value="../songs/music.mp3">
<PARAM NAME="animationatStart" VALUE="false">

<PARAM NAME="transparentatStart" VALUE="true">

<PARAM NAME="autoStart" VALUE="false">

<PARAM NAME="showControls" VALUE="true">
<embed
src="../songs/music.mp3" autostart=0 loop=0
align="absmiddle" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp"
showcontrols=1 showdisplay=1 showstatusbar=1 > </embed></object>

 

You would think that would work, but it doesn't. The path is correct. If I put a file (blah.txt) in the same folder and run and include, it works just fine.

Link to comment
https://forums.phpfreaks.com/topic/62994-embed-media-outside-root-directory/
Share on other sites

to play that stuff via the site it needs to be accessible to the world - so either temporarily copy the file into a directory that is in the root.

 

The alternative is use a flash player... Swap the path to the mp3 to a php script that can parse the mp3 and it back to the flash player to be played...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.