本文整理汇总了PHP中DBManagerFactory::getDbDrivers方法的典型用法代码示例。如果您正苦于以下问题:PHP DBManagerFactory::getDbDrivers方法的具体用法?PHP DBManagerFactory::getDbDrivers怎么用?PHP DBManagerFactory::getDbDrivers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DBManagerFactory
的用法示例。
在下文中一共展示了DBManagerFactory::getDbDrivers方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
}
$setup_db_type = $_SESSION['setup_db_type'];
$errs = '';
if (isset($validation_errors)) {
if (count($validation_errors) > 0) {
$errs = '<div id="errorMsgs">';
$errs .= "<p>{$mod_strings['LBL_SYSOPTS_ERRS_TITLE']}</p>";
$errs .= '<ul>';
foreach ($validation_errors as $error) {
$errs .= '<li>' . $error . '</li>';
}
$errs .= '</ul>';
$errs .= '</div>';
}
}
$drivers = DBManagerFactory::getDbDrivers();
foreach (array_keys($drivers) as $dname) {
$checked[$dname] = '';
}
$checked[$setup_db_type] = 'checked="checked"';
$langHeader = get_language_header();
$out = <<<EOQ
<!DOCTYPE HTML>
<html {$langHeader}>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>{$mod_strings['LBL_WIZARD_TITLE']} {$mod_strings['LBL_SYSOPTS_DB_TITLE']}</title>
<link REL="SHORTCUT ICON" HREF="include/images/sugar_icon.ico">
<link rel="stylesheet" href="install/install.css" type="text/css">
<link rel="stylesheet" href="themes/Suite7/css/fontello.css">
示例2: runCheck
function runCheck($install_script = false, $mod_strings)
{
installLog("Begin System Check Process *************");
if (!isset($install_script) || !$install_script) {
installLog("Error:: " . $mod_strings['ERR_NO_DIRECT_SCRIPT']);
die($mod_strings['ERR_NO_DIRECT_SCRIPT']);
}
if (!defined('SUGARCRM_MIN_MEM')) {
define('SUGARCRM_MIN_MEM', 40);
}
// for keeping track of whether to enable/disable the 'Next' button
$error_found = false;
$error_txt = '';
// check IIS and FastCGI
$server_software = $_SERVER["SERVER_SOFTWARE"];
if (strpos($_SERVER["SERVER_SOFTWARE"], 'Microsoft-IIS') !== false && php_sapi_name() == 'cgi-fcgi' && ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
}
if (strpos($server_software, 'Microsoft-IIS') !== false) {
$iis_version = '';
if (preg_match_all("/^.*\\/(\\d+\\.?\\d*)\$/", $server_software, $out)) {
$iis_version = $out[1][0];
}
$check_iis_version_result = check_iis_version($iis_version);
if ($check_iis_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_IIS_INVALID_VER'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_IIS_INVALID_VER']} {$iis_version}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_IISVER'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
} else {
if (php_sapi_name() != 'cgi-fcgi') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
} else {
if (ini_get('fastcgi.logging') != '0') {
installLog($mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING'] . ' ' . $iis_version);
$iisVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_FASTCGI_LOGGING']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_FASTCGI'] . '</b></td>
<td ><span class="error">' . $iisVersion . '</span></td>
</tr>';
}
}
}
}
// PHP VERSION
$php_version = constant('PHP_VERSION');
$check_php_version_result = check_php_version($php_version);
if ($check_php_version_result == -1) {
installLog($mod_strings['ERR_CHECKSYS_PHP_INVALID_VER'] . ' ' . $php_version);
$phpVersion = "<b><span class=stop>{$mod_strings['ERR_CHECKSYS_PHP_INVALID_VER']} {$php_version} )</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>' . $mod_strings['LBL_CHECKSYS_PHPVER'] . '</b></td>
<td ><span class="error">' . $phpVersion . '</span></td>
</tr>';
}
//Php Backward compatibility checks
if (ini_get("zend.ze1_compatibility_mode")) {
installLog($mod_strings['LBL_BACKWARD_COMPATIBILITY_ON'] . ' ' . 'Php Backward Compatibility');
$phpCompatibility = "<b><span class=stop>{$mod_strings['LBL_BACKWARD_COMPATIBILITY_ON']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
<td><b>Php Backward Compatibility</b></td>
<td ><span class="error">' . $phpCompatibility . '</span></td>
</tr>';
}
// database and connect
if (!empty($_REQUEST['setup_db_type'])) {
$_SESSION['setup_db_type'] = $_REQUEST['setup_db_type'];
}
$drivers = DBManagerFactory::getDbDrivers();
if (empty($drivers)) {
$db_name = $mod_strings['LBL_DB_UNAVAILABLE'];
installLog("ERROR:: {$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}");
$dbStatus = "<b><span class=stop>{$mod_strings['LBL_CHECKSYS_DB_SUPPORT_NOT_AVAILABLE']}</span></b>";
$error_found = true;
$error_txt .= '
<tr>
//.........这里部分代码省略.........