DISQUS

Tech-Recipes: PHP: determine the directory path of the server root | PHP programming | Tech-Recipes

  • Prathiban · 1 year ago
    I guess It is
    $_SERVER['DOCUMENT_ROOT'];
  • George · 11 months ago
    this does not work in my php 5 installation.
  • Dave · 2 months ago
    This doesnt work if you running your site from an alias or virtual directory
  • independentbrit · 1 month ago
    Doesn't work for me. I wonder if it is a super global and these are turned off.
  • e · 4 days ago
    echo(realpath(__FILE__));