SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2001
    Location
    Romania
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why is that slash there?

    The file name is main.php
    What the script below outputs is: /main.php and it's the same if I view the source in Internet Explorer. Is this / related to path or why is it there?

    PHP Code:
    $a=$_SERVER['PHP_SELF'];
    echo(
    $a); 

  2. #2
    SitePoint Wizard silver trophy someonewhois's Avatar
    Join Date
    Jan 2002
    Location
    Canada
    Posts
    6,364
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, that / is the path.

    If it was under another folder, it woudl be:

    /folder/main.php

    Hope this helps!

    Thanks,
    ~someonehwois

  3. #3
    Making a better wheel silver trophy DR_LaRRY_PEpPeR's Avatar
    Join Date
    Jul 2001
    Location
    Missouri
    Posts
    3,428
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yep, the slash is the root of the site.
    - Matt ** Ignore old signature for now... **
    Dr.BB - Highly optimized to be 2-3x faster than the "Big 3."
    "Do not enclose numeric values in quotes -- that is very non-standard and will only work on MySQL." - MattR


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
  •