<?php
/*
Easy_FrameWork0.1
*/
class Easy_Config_Ini {
	public $data;
	public function __construct(){
		$this->data = null;
	}
	public function set($filename, $bool=false){
		if (file_exists($filename) === false){
			echo 'ÎÄ¼þ²»´æÔÚ!';
			exit;
		}else{
			$data = parse_ini_file($filename, $bool);
			if ($bool){
				$this->data = $data[$bool];
			}else{
				$this->data = $data;
			}
		}
	}
	public function __get($name = null){
		if (is_null($name)){
			return $this->data;
		}else{
			return $this->data[$name];
		}
	}
}