Created
April 5, 2012 08:53
-
-
Save dustinlakin/2309302 to your computer and use it in GitHub Desktop.
Settings Constructor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Settings { | |
private $data = array(); | |
private $db = null; | |
public function __construct(){ | |
$this->siteRoot = str_replace("index.php", "", $_SERVER['PHP_SELF']); | |
$this->documentRoot = str_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']); | |
$this->webRoot = $_SERVER['SERVER_NAME'] . $this->siteRoot; | |
$this->viewsPath = $this->documentRoot . "views/"; | |
$this->jsPath = $this->siteRoot . "js/"; | |
$this->cssPath = $this->siteRoot . "css/"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment