Jump to content

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...

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.