just like to share a tip with you for when your programming your websites etc

PHP Code: 
//Index.php

/*
** First we need to know the exact path to where we am and define it
*/

define("APPLICATION_PATH",str_replace("\\","/",dirname(__FILE__)));

//then we need tell PHP to add our includes path to there own

$current_paths get_include_path();
$new_paths = array($current_paths,APPLICATION_PATHS  "/includes/");
set_include_path(implode(PATH_SEPARATOR,$new_paths));

/*
** No usually you will have to include your files like so
** include 'includes/myfile.php';
** but we can include as below
*/

require_once('myfile.php');

//This way it will search for myfile.php in all the paths you add into the above array :) 
litewarez Reviewed by litewarez on . Easy php includes just like to share a tip with you for when your programming your websites etc //Index.php /* ** First we need to know the exact path to where we am and define it */ define("APPLICATION_PATH",str_replace("\\","/",dirname(__FILE__))); Rating: 5