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');

?>

Related Posts:

  • Uses of fonts in php <?php $type='Type1'; $name='Helvetica-Bold'; $desc=array('Ascent'=>718,'Descent'=>-207,'CapHeight'=>718,'Flags'=>32,'FontBBox'=>'[-170 -228 1003 962]','ItalicAngle'=>0,'StemV'=>140); $up=-100; $ut=50;… Read More
  • Insert Code In PHP <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Typ… Read More
  • PHP code for Registration <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> <he… Read More
  • Connection code in PHP <?php # FileName="Connection_php_mysql.htm" # Type="MYSQL" # HTTP="true" $hostname_name = "localhost"; $database_name = "name"; $username_name = "root"; $password = ""; $job = mysql_pconnect($hostname_name, $username_name… Read More
  • PHP Code To Edit <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs" lang="cs"> <he… Read More

0 comments:

Post a Comment