[Gllug] php, Apache and relative paths.

Tom Gilbert tom at linuxbrit.co.uk
Mon Jan 21 17:25:58 UTC 2002


* Simon Stewart (sms at lateral.net) wrote:
> <!-- This link points to /var/www.ukadis/htdocs/secure/page.html -->
> <p>This is a <a href="/secure/page.html">link</a>
> 
> <? 
> // Whereas this points to exactly where it says on the local FS
> include "/secure/page.html"; 
> ?>

<?php
  # Whereas this is what you'd probably want
  include $GLOBALS["DOCUMENT_ROOT"] . "/secure/page.html";
?>

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source/UNIX consultant  | tom at linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list