Best practice question regarding set_include_path()

From: Date: Thu, 10 May 2012 15:43:47 +0000
Subject: Best practice question regarding set_include_path()
Groups: php.general 
Request: Send a blank email to php-general+get-317831@lists.php.net to get a copy of this message
For my applications, I've been using includes and other file addressing by using the doc root as the base dir. e.g. require_once $_SERVER['DOCUMENT_ROOT'] . '/miniRegDB/includes/miniRegDBconfig.php'; Recently, I ran into a problem with a new installation on a shared host where the doc root was assigned in an unusual manner. I rather not require setting a custom base dir [instead of $_SERVER['DOCUMENT_ROOT']'] for my applications. So, I was wondering if it would be good practice to use the set_include_path() and add the base dir for my applications. I've used this for dealing with Pear function files on shared servers and had no problems. Need some guidance regarding this subject. Thanks....

« previous php.general (#317831) next »