hey,

i want to grab the server path from php. i.e.- c:\apache\apache2\,
but i can't find a global variable for that... i see it listed plainly on the phpinfo() screen listed under apache2handler as Server Root.

i assume that the whole point of phpinfo() is to show what environmental variables are available to you in php! if that is true, the how does one access everything that isn't under GLOBAL??

can anyone help?

thanks,
joshua

p.s. I'd also like to be able to grab the path to php, which i don't believe is listed in phpinf()...

    You cannot actually get the path to PHP rather nor php.ini its more of a security thing im guesing. As for the path to apache that would be the same.

    phpinfo(); isnt actually for the show of variables but rather the actual configuration of both PHP and its server, which doesnt just mean Apache

      use this code:

      foreach ($GLOBALS as $key => $val) {
      echo $key." : ".$val."<br>\n";
      }

        Or how about:

        <pre>
        <?php
        print_r($GLOBALS);
        ?>
        </pre>
        

          that's a good one...every day a new function...

            Write a Reply...