View Single Post
Old 11-22-2012, 05:44 PM   PM User | #5
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,750
Thanks: 4
Thanked 2,468 Times in 2,437 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
Unless you check something before attempting to include it, there will always be overhead.
PHP Code:
if (!defined('THISSCRIPT_H'))
{
    
define('THISSCRIPT_H'true);
    
// the rest of my code.
}

// included with:
if (!defined('THISSCRIPT_H'))
{
    require 
'thatscript.php';

It won't get any better, especially since php includes off of the executing script, not the script including it. Hence why simply using _once and including it everywhere its needed is better.
Fou-Lu is offline   Reply With Quote