allex01 Posted July 5, 2008 Share Posted July 5, 2008 I have an swf object inside my index.php file. The swf file calls on a dynamic xml file named test.php. In test.php i am using the following to grab the page name of the site in hope to catch the page name index.php which is where the swf is embeded. . $url = explode('/', $_SERVER['PHP_SELF']); $page = $url[count($url) - 1]; $page iis giving me test.php not index.php. I was assuming $page will give me index.php since swf is embeded in index.php. How can i solve this problem. Thanks Link to comment https://forums.phpfreaks.com/topic/113299-page-name/ Share on other sites More sharing options...
ron8000 Posted July 5, 2008 Share Posted July 5, 2008 what is page is being loaded? is it index.php? or test.php? Link to comment https://forums.phpfreaks.com/topic/113299-page-name/#findComment-582119 Share on other sites More sharing options...
allex01 Posted July 5, 2008 Author Share Posted July 5, 2008 index.php is the page being loaded. the swf object is inside index.php without links to the xml file test.php. So swf without test.php will not work. The url in the browser shows index.php. I want to set a condition inside test.php which is being called by swf files that is in index.php that if current page is index.php do so and so. Link to comment https://forums.phpfreaks.com/topic/113299-page-name/#findComment-582123 Share on other sites More sharing options...
ron8000 Posted July 5, 2008 Share Posted July 5, 2008 try to pull your vars out of the $_SERVER['REQUEST_URI'] and see if you get the same thing Link to comment https://forums.phpfreaks.com/topic/113299-page-name/#findComment-582134 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.