include ('classes/config.php'); include_once ('classes/config.php'); require ('classes/config.php'); require_once ('classes/config.php'); Included Files Corrupting Things Whitespace before or after the php start and end markers White space or any characters before or after the <?php and ?> will be output in the same way as echo(as html) in an included file. This can be a problem, for instance having a line […]
Category: Include
Referencing Site Root
include_once ($_SERVER[‘DOCUMENT_ROOT’] . '/lang/english.php');
Detecting Name Of Page Include A File
//include_once('includes/my_include_file.php'); //Get the name of the file calling this include $calling_file = end(explode('/', $_SERVER[‘PHP_SELF’])); switch ($calling_file) { case 'some_file.php':