note 17892 deleted from function.include by jimw

From: Date: Wed, 02 Jan 2002 12:19:56 +0000
Subject: note 17892 deleted from function.include by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24275@lists.php.net to get a copy of this message
A note about the "file_a" requiring "file_b" requiring "file_c". I develop sites on my W2K Pro box with IIS 5, but the production server is a Linux/Apache box. IIS doesn't seem to support $DOCUMENT_ROOT, however it does support __FILE__, cause it's a PHP specific constant. I found a cross-platform solution if you plan on moving your site to a new server type (specifically W2K<->Apache). It is a slight modification of the previous postings. When you want to require or include something, you should never get an trouble if you always type: require_once($Dirname(__FILE__)."/"."relpath/file.php"); For the relative path you can type the full relative path ("../" and all). Regards, Chris

« previous php.notes (#24275) next »