• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP qa_db_disconnect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中qa_db_disconnect函数的典型用法代码示例。如果您正苦于以下问题:PHP qa_db_disconnect函数的具体用法?PHP qa_db_disconnect怎么用?PHP qa_db_disconnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了qa_db_disconnect函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: doctype

 function doctype()
 {
     if (isset($_REQUEST['ajax_req'])) {
         if ($_REQUEST['action'] == 'activitylist') {
             $this->output($this->activitylist());
         }
         if ($_REQUEST['action'] == 'messagelist') {
             $this->output($this->messagelist());
         }
         qa_db_disconnect();
         return null;
     }
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:13,代码来源:qa-layer-ajax.php


示例2: get_cache

 /**
  * Outputs cache to the user
  */
 private function get_cache()
 {
     qa_report_process_stage('init_page');
     qa_db_connect('qa_page_db_fail_handler');
     qa_page_queue_pending();
     qa_load_state();
     qa_check_login_modules();
     if (QA_DEBUG_PERFORMANCE) {
         if (qa_qa_version_below('1.7')) {
             qa_usage_mark('setup');
         } else {
             //global $qa_usage;
             //$qa_usage->mark('setup');
             null;
         }
     }
     qa_check_page_clicks();
     qa_set_form_security_key();
     if (!QA_CACHING_FILE) {
         $contents = $this->get_cache_db();
     } else {
         $contents = $this->get_cache_file();
     }
     $qa_content = array();
     // Dummy contents
     $userid = qa_get_logged_in_userid();
     $questionid = qa_request_part(0);
     $cookieid = qa_cookie_get(true);
     if (is_numeric($questionid)) {
         $question = qa_db_select_with_pending(qa_db_full_post_selectspec($userid, $questionid));
         if (is_numeric($questionid) && qa_opt('do_count_q_views') && !preg_match("/^(?:POST|PUT)\$/i", $_SERVER["REQUEST_METHOD"]) && !qa_is_http_post() && qa_is_human_probably() && (!$question['views'] || ($question['lastviewip'] != qa_remote_ip_address() || !isset($question['lastviewip'])) && ($question['createip'] != qa_remote_ip_address() || !isset($question['createip'])) && ($question['userid'] != $userid || !isset($question['userid'])) && ($question['cookieid'] != $cookieid || !isset($question['cookieid'])))) {
             $qa_content['inc_views_postid'] = $questionid;
         } else {
             $qa_content['inc_views_postid'] = null;
         }
         qa_do_content_stats($qa_content);
     }
     if (QA_DEBUG_PERFORMANCE) {
         ob_start();
         if (qa_qa_version_below('1.7')) {
             qa_usage_output();
         } else {
             global $qa_usage;
             $qa_usage->output();
         }
         $contents .= ob_get_contents();
         ob_end_clean();
     }
     qa_db_disconnect();
     header('Content-type: ' . strtr('^type/^format; charset=utf-8', array('^type' => 'text', '^format' => $this->get_cache_file_extension())));
     exit($contents);
 }
开发者ID:amiyasahu,项目名称:q2a-caching,代码行数:55,代码来源:qa-caching-main.php


示例3: qa_xml

        $urlxml = qa_xml(qa_q_path($question['postid'], $question['title'], true, @$question['obasetype'], @$question['opostid']));
    }
    if (isset($blockwordspreg)) {
        $question['title'] = qa_block_words_replace($question['title'], $blockwordspreg);
    }
    //	Build the inner XML structure for each item
    $lines[] = '<item>';
    $lines[] = '<title>' . qa_xml($titleprefix . $question['title']) . '</title>';
    $lines[] = '<link>' . $urlxml . '</link>';
    if (isset($htmlcontent)) {
        $lines[] = '<description>' . qa_xml($htmlcontent) . '</description>';
    }
    if (isset($question['categoryname'])) {
        $lines[] = '<category>' . qa_xml($question['categoryname']) . '</category>';
    }
    $lines[] = '<guid isPermaLink="true">' . $urlxml . '</guid>';
    if (isset($time)) {
        $lines[] = '<pubDate>' . qa_xml(gmdate('r', $time)) . '</pubDate>';
    }
    $lines[] = '</item>';
}
$lines[] = '</channel>';
$lines[] = '</rss>';
//	Disconnect here, once all output is ready to go
qa_db_disconnect();
//	Output the XML - and we're done!
header('Content-type: text/xml; charset=utf-8');
echo implode("\n", $lines);
/*
	Omit PHP closing tag to help avoid accidental output
*/
开发者ID:swuit,项目名称:swuit-q2a,代码行数:31,代码来源:qa-feed.php


示例4: get_cache

 /**
  * Outputs cache to the user
  */
 private function get_cache()
 {
     global $qa_usage;
     qa_db_connect('qa_page_db_fail_handler');
     qa_page_queue_pending();
     qa_load_state();
     qa_check_login_modules();
     qa_check_page_clicks();
     $contents = @file_get_contents($this->cache_file);
     if (!$contents) {
         return;
     }
     //cache failure, graceful exit
     $qa_content = array();
     // Dummy contents
     $userid = qa_get_logged_in_userid();
     $questionid = qa_request_part(0);
     $cookieid = qa_cookie_get(true);
     if (is_numeric($questionid)) {
         $question = qa_db_select_with_pending(qa_db_full_post_selectspec($userid, $questionid));
         if (is_numeric($questionid) && qa_opt('do_count_q_views') && !$this->post_method && !qa_is_http_post() && qa_is_human_probably() && (!$question['views'] || ($question['lastviewip'] != qa_remote_ip_address() || !isset($question['lastviewip'])) && ($question['createip'] != qa_remote_ip_address() || !isset($question['createip'])) && ($question['userid'] != $userid || !isset($question['userid'])) && ($question['cookieid'] != $cookieid || !isset($question['cookieid'])))) {
             $qa_content['inc_views_postid'] = $questionid;
         } else {
             $qa_content['inc_views_postid'] = null;
         }
         qa_do_content_stats($qa_content);
     }
     if (QA_DEBUG_PERFORMANCE) {
         ob_start();
         $qa_usage->output();
         $contents .= ob_get_contents();
         ob_end_clean();
     }
     qa_db_disconnect();
     exit($contents);
 }
开发者ID:stevenev,项目名称:q2a-caching,代码行数:39,代码来源:qa-caching-main.php


示例5: qa_base_db_disconnect

function qa_base_db_disconnect()
{
    qa_db_disconnect();
}
开发者ID:TheProjecter,项目名称:microprobe,代码行数:4,代码来源:qa-base.php



注:本文中的qa_db_disconnect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP qa_db_escape_string函数代码示例发布时间:2022-05-15
下一篇:
PHP qa_db_connect函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap