public static function make_html() { global $_G; if (self::$htmlfilename) { $filepath = DISCUZ_ROOT . '/' . self::$htmlfilename . '.' . $_G['setting']['makehtml']['extendname']; dmkdir(dirname($filepath)); $cend = '</body></html>'; $code = ob_get_clean() . $cend; $code = preg_replace('/language\\s*=[\\s|\'|\\"]*php/is', '_', $code); $code = str_replace(array('<?', '?>'), array('<?', '?>'), $code); if (file_put_contents($filepath, $code) !== false) { $_G['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); if (self::$callback && is_callable(self::$callback)) { call_user_func(self::$callback); self::$callback = self::$callbackdata = null; } self::$returndata['status'] = 'html_ok'; if (isset(self::$viewurl)) { self::$returndata['path'] = self::$viewurl; } else { self::$returndata['path'] = self::$htmlfilename . '.' . $_G['setting']['makehtml']['extendname']; } showmessage('do_success', null, self::$returndata); } } }
public static function make_html() { global $_G; if (self::$htmlfilename) { $filepath = DISCUZ_ROOT . '/' . self::$htmlfilename . '.' . $_G['setting']['makehtml']['extendname']; dmkdir(dirname($filepath)); $cend = '</body></html>'; if (file_put_contents($filepath, ob_get_clean() . $cend) !== false) { $_G['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); if (self::$callback && is_callable(self::$callback)) { call_user_func(self::$callback); self::$callback = self::$callbackdata = null; } self::$returndata['status'] = 'html_ok'; if (isset(self::$viewurl)) { self::$returndata['path'] = self::$viewurl; } else { self::$returndata['path'] = self::$htmlfilename . '.' . $_G['setting']['makehtml']['extendname']; } showmessage('do_success', null, self::$returndata); } } }