本文整理汇总了PHP中qa_exit函数的典型用法代码示例。如果您正苦于以下问题:PHP qa_exit函数的具体用法?PHP qa_exit怎么用?PHP qa_exit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qa_exit函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: qa_install_db_fail_handler
function qa_install_db_fail_handler($type, $errno = null, $error = null, $query = null)
{
global $pass_failure_from_install;
$pass_failure_type = $type;
$pass_failure_errno = $errno;
$pass_failure_error = $error;
$pass_failure_query = $query;
$pass_failure_from_install = true;
require QA_INCLUDE_DIR . 'qa-install.php';
qa_exit('error');
}
示例2: qa_page_db_fail_handler
function qa_page_db_fail_handler($type, $errno = null, $error = null, $query = null)
{
if (qa_to_override(__FUNCTION__)) {
$args = func_get_args();
return qa_call_override(__FUNCTION__, $args);
}
$pass_failure_type = $type;
$pass_failure_errno = $errno;
$pass_failure_error = $error;
$pass_failure_query = $query;
require_once QA_INCLUDE_DIR . 'qa-install.php';
qa_exit('error');
}
示例3: qa_feed_not_found
function qa_feed_not_found()
{
header('HTTP/1.0 404 Not Found');
echo qa_lang_html('misc/feed_not_found');
qa_exit();
}
示例4: qa_image_db_fail_handler
function qa_image_db_fail_handler()
{
header('HTTP/1.1 500 Internal Server Error');
qa_exit('error');
}
示例5: qa_redirect_raw
function qa_redirect_raw($url)
{
if (qa_to_override(__FUNCTION__)) {
$args = func_get_args();
return qa_call_override(__FUNCTION__, $args);
}
header('Location: ' . $url);
qa_exit('redirect');
}
示例6: array
$qa_content['script_onloads'][] = array("qa_mailing_start('mailing_ok', 'domailingpause');");
} else {
// rudimentary non-Javascript version of mass mailing loop
echo '<tt>';
while (true) {
qa_mailing_perform_step();
$message = qa_mailing_progress_message();
if (!isset($message)) {
break;
}
echo qa_html($message) . str_repeat(' ', 1024) . "<br>\n";
flush();
sleep(1);
}
echo qa_lang_html('admin/mailing_complete') . '</tt><p><a href="' . qa_path_html('admin/mailing') . '">' . qa_lang_html('admin/admin_title') . ' - ' . qa_lang_html('admin/mailing_title') . '</a>';
qa_exit();
}
}
function qa_optionfield_make_select(&$optionfield, $options, $value, $default)
{
$optionfield['type'] = 'select';
$optionfield['options'] = $options;
$optionfield['value'] = isset($options[qa_html($value)]) ? $options[qa_html($value)] : @$options[$default];
}
$indented = false;
foreach ($showoptions as $optionname) {
if (empty($optionname)) {
$indented = false;
$qa_content['form']['fields'][] = array('type' => 'blank');
} elseif (strpos($optionname, '/') !== false) {
$qa_content['form']['fields'][] = array('type' => 'static', 'label' => qa_lang_html($optionname));
示例7: qa_ajax_db_fail_handler
function qa_ajax_db_fail_handler()
{
echo "QA_AJAX_RESPONSE\n0\nA database error occurred.";
qa_exit('error');
}
示例8: qa_db_fail_error
/**
* If a DB error occurs, call the installed fail handler (if any) otherwise report error and exit immediately.
*/
function qa_db_fail_error($type, $errno = null, $error = null, $query = null)
{
if (qa_to_override(__FUNCTION__)) {
$args = func_get_args();
return qa_call_override(__FUNCTION__, $args);
}
global $qa_db_fail_handler;
@error_log('PHP Question2Answer MySQL ' . $type . ' error ' . $errno . ': ' . $error . (isset($query) ? ' - Query: ' . $query : ''));
if (function_exists($qa_db_fail_handler)) {
$qa_db_fail_handler($type, $errno, $error, $query);
} else {
echo '<hr><font color="red">Database ' . htmlspecialchars($type . ' error ' . $errno) . '<p>' . nl2br(htmlspecialchars($error . "\n\n" . $query));
qa_exit('error');
}
}