SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Twitter - @CarlBeckel busy's Avatar
    Join Date
    May 2004
    Location
    Richmond, VA, USA
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    I want to get just the filename from HTTP_REFERER

    This is my first post in the PHP forum, so hello everyone!

    OK, I know I can get the referring url with
    PHP Code:
    <? echo $_SERVER["HTTP_REFERER"]; ?>
    but I'm hoping to single out just the filename, minus the extension.

    For example, if the above code returns
    h t t p ://localhost/Projects/aluminum.php
    I would like to be able to get the value "aluminum"

    (Be gentle please, I'm WAY more used to HTML than PHP)

  2. #2
    Twitter - @CarlBeckel busy's Avatar
    Join Date
    May 2004
    Location
    Richmond, VA, USA
    Posts
    819
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind on this, I just realized I need the filename of an include to do what I wanted to do, I'm going to try to do this another way.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •