Jump to content

Changing executing directory of a requested page?


Koobazaur

Recommended Posts

Greetings.

 

On my website I use PHP to generate pages from a single index.php. This means that the directory base directory is wherever the index file is. The problem arises when I embed flash files from different directories - some of theme need to use a streaming audio file that is placed in the same directory as the flash file. Problem is, since I am embeding them from index, the flash looks for the streaming audio from the base directory, not the directory where it is placed.

 

Is there any way I can somehow change my executing directory or where the flash looks for the files? Otherwise I'll have to flood my public_html with all sorts of audio files...

 

Thanks!

Link to comment
Share on other sites

My index.php wouldn't really tell you much as all it does is include a file and call it's function. Hence, all my website is visible through that one index file in my public_html

 

Essentailly, my problem is that I am embedding a flash file not in the current directoy (my src may be something like "somedir/flash/myfile.swf") and my flash file wants to stream an mp3 located in the current directory. However, this means having to put every mp3 for every flash that does that in my public_html, which I don't really want to do. Hence why I am wonder if there's any way to make the flash file think we are in the "somedir/flash/" instead of root dir.

Link to comment
Share on other sites

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.