I need to have just the base file name of the referer without any trailing stuff from ?something=something and so on. However using PHP's base function does not remove anything after the file extension. I need to remove all URI commands/queries/properties/values whatever they are referred to as but keep the refering file name intact.
So if the referer was index.php?audio=1&connection=2 I want to strip the referer down to index.php. How do I do this?
Referer base withOUT ?something=something&somerthing....
Moderator: General Moderators
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
- JAB Creations
- DevNet Resident
- Posts: 2341
- Joined: Thu Jan 13, 2005 6:44 pm
- Location: Sarasota Florida
- Contact:
Ok I'm not sure the answer to my original question but somehow I answered a question to a more advanced version of this with AJAX.
Using AJAX to include an XHTML file (after the page loads in order to reduce initial page load size) I wanted to have a form on the AJAX includes file. However if I echoed the page's self location it would spit out the AJAX file name instead of the page (say index.php). I have learned a little bit about return...
index.php
AJAX includes...
The AJAX code I use can be found at...
http://www.dynamicdrive.com/dynamicinde ... ontent.htm
I can understand out-of-the-box stuff, I just am not sure about dynamically creating this stuff, mostly because no one is posting any examples!
Using AJAX to include an XHTML file (after the page loads in order to reduce initial page load size) I wanted to have a form on the AJAX includes file. However if I echoed the page's self location it would spit out the AJAX file name instead of the page (say index.php). I have learned a little bit about return...
index.php
Code: Select all
ajaxpage('templates/ajax-prompt-theme.php?return=<?php echo $_SERVER['PHP_SELF'];?>', 'themes');Code: Select all
<?php echo basename($_GET['return']); ?>http://www.dynamicdrive.com/dynamicinde ... ontent.htm
I can understand out-of-the-box stuff, I just am not sure about dynamically creating this stuff, mostly because no one is posting any examples!