Changeset 560 for trunk/Modules/SpeedTest/common.php
- Timestamp:
- Aug 9, 2013, 10:29:25 PM (11 years ago)
- Location:
- trunk/Modules/SpeedTest
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/SpeedTest/common.php
r331 r560 14 14 function ReadConfig($config_file) { 15 15 global $config; 16 $config = (object)array(); 16 17 $lines = file($config_file); 17 18 foreach ($lines as $line_num => $line) { … … 20 21 $section = $parts[0]; 21 22 $section = preg_replace("/[\[\]]/","",$section); 23 $config->{$section} = (object)array(); 22 24 } elseif (preg_match("/=/",$line)) { 23 list($var,$value) = split('=',$line);25 list($var,$value) = explode('=',$line); 24 26 $var = preg_replace('/ $/','',$var); 25 27 $value = preg_replace('/^ +/','',$value); … … 51 53 fclose($LOG); 52 54 } 53 54 55 56 ?>
Note:
See TracChangeset
for help on using the changeset viewer.