public static function init($opt = array()) { self::$opt = array_merge(self::$opt, $opt); $filename = self::$opt['path'] . self::$opt['file']; if (is_dir(self::$opt['path']) == false) { mkdir(self::$opt['path'], 0755, true); } self::$nhd = fopen($filename, 'a+'); self::$whd = fopen($filename . '.wf', 'a+'); }