Friday, July 18, 2014

Initializing Website With 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', '/');

defined('SITE_ROOT') ? null :
define('SITE_ROOT', DS.'wamp'.DS.'www'.DS.'folderName');

defined('LIB_PATH') ? null : define('LIB_PATH', SITE_ROOT.DS.'Folder Containing other files');

// 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');
require_once('database_object.php');
// require_once('pagination.php');
// require_once("phpMailer".DS."class.phpmailer.php");
// require_once("phpMailer".DS."class.smtp.php");
// require_once("phpMailer".DS."language".DS."phpmailer.lang-en.php");

// load database-related classes
require_once(LIB_PATH.DS.'user.php');
require_once(LIB_PATH.DS.'slider.php');
require_once(LIB_PATH.DS.'gallery.php');
require_once(LIB_PATH.DS.'news.php');


// require_once('comment.php');

?>

0 comments:

Post a Comment