当前位置: 首页>>代码示例>>PHP>>正文


PHP cls_mysql::close方法代码示例

本文整理汇总了PHP中cls_mysql::close方法的典型用法代码示例。如果您正苦于以下问题:PHP cls_mysql::close方法的具体用法?PHP cls_mysql::close怎么用?PHP cls_mysql::close使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cls_mysql的用法示例。


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

示例1: array

 if (!trim($settings['uc_api'])) {
     $error = true;
     $sysmsg[] = __('uc_api_error');
 }
 if (!$settings['uc_appid']) {
     $error = true;
     $sysmsg[] = __('uc_appid_error');
 }
 if ($settings['connect_uc'] && !$error) {
     $dbuc = new cls_mysql();
     $dbuc->connect($settings['uc_dbhost'], $settings['uc_dbuser'], $settings['uc_dbpwd'], $settings['uc_dbname'], $settings['uc_pconnect']);
     $username = @$dbuc->result_first("select username from `{$settings['uc_dbname']}`.{$settings['uc_dbtablepre']}members where username='{$settings['uc_admin']}' limit 1");
     if ($q) {
         $dbuc->free($q);
     }
     $dbuc->close();
     if (!$username) {
         $error = true;
         $sysmsg[] = __('uc_admin_error');
     }
 }
 if (!$error) {
     $charset_arr = array('gbk' => 'gbk', 'utf-8' => 'utf8');
     $settings['uc_dbcharset'] = $charset_arr[strtolower($settings['uc_charset'])];
     settings_cache($settings);
     $str = "<?php" . LF . LF;
     $str .= "// This is PHPDISK auto-generated file. Do NOT modify me." . LF;
     $str .= "// Cache Time: " . date("Y-m-d H:i:s", $timestamp) . LF . LF;
     $str .= "define('UC_CONNECT', 'mysql');" . LF;
     $str .= "define('UC_DBHOST', '{$settings['uc_dbhost']}');" . LF;
     $str .= "define('UC_DBUSER', '{$settings['uc_dbuser']}');" . LF;
开发者ID:saintho,项目名称:phpdisk,代码行数:31,代码来源:admin.inc.php

示例2: array

    }
    $alertarr = array('add' => array('dbsourceadd', 'dbsourcesedit'), 'edit' => array('dbsourcedetail', 'dbsourcedetail'));
    $dbsourcenew['cname'] = trim(strip_tags($dbsourcenew['cname']));
    $dbsourcenew['dbhost'] = trim(strip_tags($dbsourcenew['dbhost']));
    $dbsourcenew['dbuser'] = trim(strip_tags($dbsourcenew['dbuser']));
    $dbsourcenew['dbname'] = trim(strip_tags($dbsourcenew['dbname']));
    if (empty($dbsourcenew['cname']) || empty($dbsourcenew['dbhost']) || empty($dbsourcenew['dbuser']) || empty($dbsourcenew['dbname'])) {
        $checkmsg = lang('dbsrc_data_miss');
    } else {
        $s_db = new cls_mysql();
        if (!$s_db->connect($dbsourcenew['dbhost'], $dbsourcenew['dbuser'], $dbsourcenew['dbpw'], $dbsourcenew['dbname'], 0, false, $dbsourcenew['dbcharset'])) {
            $checkmsg = lang('dbsrc_connect_error');
        } else {
            $checkmsg = lang('dbsrc_connect_correct');
        }
        $s_db->close();
    }
    echo '<script language="javascript" reload="1">alert(\'' . addslashes($checkmsg) . '\');parent.$(\'' . $alertarr[$deal][0] . '\').action=\'?entry=dbsources&action=' . $alertarr[$deal][1] . '\';parent.$(\'' . $alertarr[$deal][0] . '\').target=\'_self\'</script>';
} elseif ($action == 'mailcheck') {
    $mail_to = trim($mconfigsnew['mail_to']);
    $mail_sign = trim($mconfigsnew['mail_sign']);
    $mail_smtp = trim($mconfigsnew['mail_smtp']);
    $mail_mode = trim($mconfigsnew['mail_mode']);
    $mail_port = trim($mconfigsnew['mail_port']);
    $mail_auth = trim($mconfigsnew['mail_auth']);
    $mail_from = trim($mconfigsnew['mail_from']);
    $mail_user = trim($mconfigsnew['mail_user']);
    $mail_pwd = trim($mconfigsnew['mail_pwd']);
    $mail_delimiter = trim($mconfigsnew['mail_delimiter']);
    $mail_silent = trim($mconfigsnew['mail_silent']);
    $checkmsg = mailto($mail_to, lang('test_mail'), lang('test_mail'), array(), $mail_sign, 1);
开发者ID:polarlight1989,项目名称:08cms,代码行数:31,代码来源:checks.inc.php


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