本文整理汇总了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;
示例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);