best way to properly build an include path *regardless* from where I am calling the include?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am confusing myself reading the docs just now.

i.e.:
include_path
basename()
and dirname()

 I had thought from many months ago that
<?php include '/somedir/somefile.php'; ?>
would include
somefile.php
living in
somedir
regardless from where in the site structure I am calling it.

Now it does not seem to be doing that.

What is the safest (portable) way to properly build an include path *regardless* from where in my site I am calling the include? If I understand right I can put includes in a dir/ specified by the include_path setting, but I also want to know how to do this from just within the root of my virtual server.

-Govinda
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux