Re: [PHP] Re: website tree



John Gunther wrote:
Get the various parts from the $_SERVER superglobal variable:
1) scheme (e.g. http://) from $_SERVER['HTTPS'] (https if "on")
2) host:port (e.g. bucksvsbytes.com) from $_SERVER['HTTP_HOST']
3) /path/page?query part (e.g. /catalog/index.php?pid=444) from $_SERVER['REQUEST_URI']

There's also $_SERVER['PHP_SELF']. Probably others too. Simply:

<?php
print_r($_SERVER);
?>

This will show you what's available to you.

--
Richard Heyes
http://www.websupportsolutions.co.uk

Knowledge Base and HelpDesk software
that can cut the cost of online support

** NOW OFFERING FREE ACCOUNTS TO CHARITIES AND NON-PROFITS **
.



Relevant Pages

  • Re: [PHP] Round
    ... Richard Heyes ... Knowledge Base and HelpDesk software ...
    (php.general)
  • Just to confirm...
    ... Emails that bounce get sent back to the address in the Return-Path: header. ... Richard Heyes ... Knowledge Base and HelpDesk software ...
    (php.general)
  • Re: [PHP] Question About Blocking Email Addresses in Forms
    ... I made a class which converted numbers to text (TextualNumbers IIRC) and it got broken. ... Richard Heyes ... Knowledge Base and Helpdesk software that eases your support ...
    (php.general)
  • PEAR website and MSIE 6
    ... It consistently crashes for me. ... Richard Heyes ... Knowledge Base and Helpdesk software for £299pa hosted for you - ...
    (php.general)
  • Re: [PHP] Round
    ... Probably a precision thing. ... Richard Heyes ... Knowledge Base and HelpDesk software ...
    (php.general)