ingvaro Posted December 9, 2006 Share Posted December 9, 2006 I´m currently rebuilding my web site using PHP and MySQL, before it was all HTML. I had a photo gallery i made in Flash, that loaded images from a XML file like this[code]xmlData.load("images.xml");[/code]Super simple :)But now i have my whole site built so that i have just one index.php and it includes everything else i want to show, so far everything works except this.See, i have many many galleries, and i can easily fix this by just putting in "galleries/gallery1/images.xml" in the path, but that only works for a single gallery, so i basically need to be able to have the flash file load the xml file from the same folder, but the $_GET gets in the way :(Someone tell me how to fix this Link to comment https://forums.phpfreaks.com/topic/30016-my-photo-gallery%C2%B4s-messed-up/ Share on other sites More sharing options...
artacus Posted December 9, 2006 Share Posted December 9, 2006 Ok, first that's one queer avitar.Now that I got that off my chest, let me see if I understand the question. What do you mean the $_GET gets in the way? You can get tons of information about where you are on your server, or what the query string was, etc. by using the $_SERVER variable. If I understand what is going on, just make an array of your galleries with info on where the xml file is. So [code]$myGal = ($_GET['gallery']) ? $_GET['gallery'] : 'vacation';$galleries = array('vacation'=>'/galleries/vacation/', 'queerassavatars'=>'/galleries/qaa/');if($xml = $galleries[$myGal]) {...[/code] Link to comment https://forums.phpfreaks.com/topic/30016-my-photo-gallery%C2%B4s-messed-up/#findComment-138151 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.