3 |
/** |
/** |
4 |
* Config_File class. |
* Config_File class. |
5 |
* |
* |
6 |
* @version 2.3.0 |
* @version 2.3.1 |
7 |
* @author Andrei Zmievski <andrei@php.net> |
* @author Andrei Zmievski <andrei@php.net> |
8 |
* @access public |
* @access public |
9 |
* |
* |
60 |
*/ |
*/ |
61 |
var $read_hidden = true; |
var $read_hidden = true; |
62 |
|
|
63 |
|
/** |
64 |
|
* Controls whether or not to fix mac or dos formatted newlines. |
65 |
|
* If set to true, \r or \r\n will be changed to \n. |
66 |
|
* |
67 |
|
* @access public |
68 |
|
*/ |
69 |
|
var $fix_newlines = true; |
70 |
|
|
71 |
/* Private variables */ |
/* Private variables */ |
72 |
var $_config_path = ""; |
var $_config_path = ""; |
73 |
var $_config_data = array(); |
var $_config_data = array(); |
261 |
|
|
262 |
$contents = fread($fp, filesize($config_file)); |
$contents = fread($fp, filesize($config_file)); |
263 |
fclose($fp); |
fclose($fp); |
264 |
|
|
265 |
|
if($this->fix_newlines) { |
266 |
|
// fix mac/dos formatted newlines |
267 |
|
$contents = preg_replace('!\r\n?!',"\n",$contents); |
268 |
|
} |
269 |
|
|
270 |
$config_data = array(); |
$config_data = array(); |
271 |
|
|