[PHP] Re: relative paths with require

2004-10-27 Thread Jason Barnett
If you need relative require's, I have always found the constant __FILE__ to be useful. Just something like: require_once (__FILE__ . ../b/b.php); If you go this route, be sure to check out the user notes on the page here: http://us2.php.net/constants Joey Morwick wrote: Hello, I'm experiencing

[PHP] Re: relative paths

2001-11-17 Thread Gaylen Fraley
You've answered your own question. If document-root is set to /usr/web/htdocs then require(/somefile) will expect to find somefile in document-root. -- Gaylen [EMAIL PROTECTED] Home http://www.gaylenandmargie.com PHP KISGB v2.22 Guestbook http://www.gaylenandmargie.com/phpwebsite Mitja Pagon