/** * Opens the log specified by $name. If no name is given * it will receive a default name * @param string $name the name of the file */ public static function open($name = null) { if (is_null($name)) { $name = 'sa_' . date('Y-m-d') . '.log'; } self::$fp = @fopen(SAE_LOGS_DIR . $name, 'a'); }