Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ob_start(); // output buffering is turned on
- // Assign file paths to PHP constants
- // __FILE__ returns the current path to this file
- // dirname() returns the path to the parent directory
- //define("PRIVATE_PATH", dirname(__FILE__));
- define("PROJECT_PATH", substr(dirname(__FILE__), 0, strlen(dirname(__FILE__)) - 13));
- define("HTML_PATH", PROJECT_PATH . '/html');
- define("INCLUDE_PATH", PROJECT_PATH . '/html/include');
- // Assign the root URL to a PHP constant
- // * Do not need to include the domain
- // * Use same document root as webserver
- // * Can set a hardcoded value:
- // define("WWW_ROOT", '/~kevinskoglund/globe_bank/public');
- // define("WWW_ROOT", '');
- // * Can dynamically find everything in URL up to "/public"
- $public_end = strpos($_SERVER['SCRIPT_NAME'], '/HTML') + 19;
- $doc_root = substr($_SERVER['SCRIPT_NAME'], 0, $public_end);
- define("WWW_ROOT", $doc_root );
- define("WWW_CB", WWW_ROOT . '/html/Company_Background');
- define("WWW_M", WWW_ROOT . '/html/members');
- define("IMAGES_PATH", WWW_ROOT . '/images');
- define("CSS_PATH", WWW_ROOT . '/css');
- define("SCRIPT_PATH", WWW_ROOT . '/scripts');
- define("INCL_PATH", WWW_ROOT. '/html/include');
- //echo WWW_ROOT;
- require_once('functions.php');
- require_once('database.php');
- session_start();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement