function __k_die($s = '', $obc = true) { if (C2_CLI) { __k_prn($s, $obc); } else { try { $c2 = __k_fetch("c2"); } catch (Exception $e) { __k_json($s, "e", $obc); exit(1); } $er = $c2['path.err'] . '/' . __k_str($s) . ".html"; if (is_readable($er)) { readfile($er); } else { __k_json($s, "e", $obc); } } exit(1); }
function __k_die($str = '', $exit = 1, $obclean = true) { if (COBRA_CLI) { __k_print($str, $obclean); } else { $cobra = __k_cache_fetch(); $error_html = $cobra['path.error'] . '/' . __k_safe_str($str) . COBRA_ERROR_EXTENSION; if (is_readable($error_html)) { readfile($error_html); } else { __k_json($str, $obclean); } } exit($exit); }