Skip to content

Instantly share code, notes, and snippets.

@NoMan2000
Created January 31, 2014 22:19
Show Gist options
  • Save NoMan2000/8744421 to your computer and use it in GitHub Desktop.
Save NoMan2000/8744421 to your computer and use it in GitHub Desktop.
PHP Always have a base root folder
<?php
define("DS",DIRECTORY_SEPARATOR,true);
define('BASE_PATH',realpath(dirname(__FILE__)).DS,true);
$include_file = BASE_PATH . '.mysql.inc.php';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment