WEB Simple question... trying to find out the exact location of my public_html folder

Discussion in 'OT Technology' started by Ricky, Jan 9, 2008.

  1. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    Is it possible to make a script, that'll show you where that script is located LOCALLY. for example when i run the php script, it'll point to /usr/blag/blah/ricky.com/public_html/script.php ?


    Anyone know what i'm talking about ?

    I'm sure it's possible but i suck at teh php
     
  2. TheDarkHorizon

    TheDarkHorizon \xC0\xFF\xEE

    Joined:
    Sep 26, 2002
    Messages:
    2,396
    Likes Received:
    0
    Location:
    San Francisco, CA
    Use __FILE__.
     
  3. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    i know like almost nothing about php :o

    Do you mind posting a small simple script ( if possible please ).

    I have to finish this project for a client and this information is needed :run:
     
  4. TheDarkHorizon

    TheDarkHorizon \xC0\xFF\xEE

    Joined:
    Sep 26, 2002
    Messages:
    2,396
    Likes Received:
    0
    Location:
    San Francisco, CA
    Any script?

    Code:
    <?php
      $path = substr(__FILE__, 0, strrpos(__FILE__, '/'));
      $filename = substr(__FILE__, strrpos(__FILE__, '/') + 1);
    
      echo 'Path: ' . $path . "\n";
      echo 'Filename: ' . $filename . "\n";
    ?>
    
     
  5. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    thank you :)
     
  6. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,766
    Likes Received:
    6
    works perfectly.
     
  7. Jesse

    Jesse PSN: iamajesse; XBL: Inhale My Rod; G8 GT crew; Ne OT Supporter

    Joined:
    Jan 12, 2005
    Messages:
    25,649
    Likes Received:
    0
    Location:
    California :: (925)
    Why not just check with torrentflux. I'm sure thats what you're trying to set up. It tells you :hsughno:
     
  8. Rawrsome

    Rawrsome RAWR

    Joined:
    Oct 6, 2003
    Messages:
    3,072
    Likes Received:
    0
    Location:
    Santa Barbara, CA / Boston, MA
    You just reminded me I need to install tflux on my new server. Thanks! :bowdown:
     

Share This Page