Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Reading data from config file
- protected function readData() {
- $configFile = './../data/_config.db';
- if($data = file($configFile)) {
- foreach($data as $line) {
- if(substr($line, 0, 2) != '//' && strlen($line) >= 3) {
- $dat = explode('=', $line);
- $parameter = trim($dat[0]);
- $this->$parameter = trim($dat[1]);
- }
- }
- }
- else {
- throw new Exception('Unable to configure settings.');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement