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!

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.

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.