--- Tim Makins <[EMAIL PROTECTED]> wrote:

> Thanks very much, Pete - that solved the problem !!!
> 
> I'm still having trouble getting my head around this
> - its rather like
> 'Alice in Wonderland': concentrate not on where you
> are now, but where you
> might be if someone somewhere else wants you to be
> there too. Confused? yes,
> but at least its working.
> 
> Tim in Ireland.

Tim,

I can very much relate to your confusion. When I first
started using includes in my PHP scripts, I was
writing huge blocks of code just to have the script
figure out where it was and then put in the includes
from there. Finally, I figured out that you can use
the full filesystem path in your include and save all
that headache. For instance, this line of code appears
in every page of my website, which calls the page
header and the navigation bar on the left:

<?php

include('/srv/www/htdocs/header.php');

?>

This way, I can include the header file using the
exact same line of code in every script, no matter
where header.php is located in relation to the script
that is calling it. If you're using a Windows box, you
would just use something like:

include('c:/wwwroot/header.php');

instead.

HTH, and Good Luck!
-Nick


        
                
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/ 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/HKFolB/TM
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to