finnaz Posted February 15, 2010 Share Posted February 15, 2010 I've been following a tutorial from lynda.com (beyond the basics) - theres a page of code which defines your site root. But I cant seem to find the correct path - here is the code of initilize.php <?php // Define the core paths // Define them as absolute paths to make sure that require_once works as expected // DIRECTORY_SEPARATOR is a PHP pre-defined constant // (\ for Windows, / for Unix) defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); defined('SITE_ROOT') ? null : define('SITE_ROOT', DS.'Users'.DS.'kevin'.DS.'Sites'.DS.'photo_gallery'); //define('SITE_ROOT', DS.'home'.DS.'sites'.DS.'mydomain.com'.DS.'public_html'); THIS IS WHAT I TRIED BUT IT DOESNT WORK defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'includes'); // load config file first require_once(LIB_PATH.DS.'config.php'); // load basic functions next so that everything after can use them require_once(LIB_PATH.DS.'functions.php'); // load core objects require_once(LIB_PATH.DS.'session.php'); require_once(LIB_PATH.DS.'database.php'); // load database-related classes require_once(LIB_PATH.DS.'user.php'); ?> My document root from phpinfo is /home/sites/mydomain.com/public_html/ - any help would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/192115-site-root/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.