本文整理匯總了PHP中rex_sql::getServerVersion方法的典型用法代碼示例。如果您正苦於以下問題:PHP rex_sql::getServerVersion方法的具體用法?PHP rex_sql::getServerVersion怎麽用?PHP rex_sql::getServerVersion使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類rex_sql
的用法示例。
在下文中一共展示了rex_sql::getServerVersion方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: phpversion
<p>' . rex_i18n::msg('delete_cache_description') . '</p>
<p><a class="btn btn-delete" href="' . rex_url::currentBackendPage(['func' => 'generate']) . '">' . rex_i18n::msg('delete_cache') . '</a></p>
<h3>' . rex_i18n::msg('setup') . '</h3>
<p>' . rex_i18n::msg('setup_text') . '</p>
<p><a class="btn btn-setup" href="' . rex_url::currentBackendPage(['func' => 'setup']) . '" data-confirm="' . rex_i18n::msg('setup_restart') . '?" data-pjax="false">' . rex_i18n::msg('setup') . '</a></p>';
$content[] = '
<h3>' . rex_i18n::msg('version') . '</h3>
<dl class="dl-horizontal">
<dt>REDAXO</dt><dd>' . rex::getVersion() . '</dd>
<dt>PHP</dt><dd>' . phpversion() . ' <a href="' . rex_url::backendPage('system/phpinfo') . '" title="phpinfo" onclick="newWindow(\'phpinfo\', this.href, 800,600,\',status=yes,resizable=yes\');return false;"><i class="rex-icon rex-icon-phpinfo"></i></a></dd>
</dl>
<h3>' . rex_i18n::msg('database') . '</h3>
<dl class="dl-horizontal">
<dt>MySQL</dt><dd>' . rex_sql::getServerVersion() . '</dd>
<dt>' . rex_i18n::msg('name') . '</dt><dd>' . $dbconfig[1]['name'] . '</dd>
<dt>' . rex_i18n::msg('host') . '</dt><dd>' . $dbconfig[1]['host'] . '</dd>
</dl>';
$fragment = new rex_fragment();
$fragment->setVar('content', $content, false);
$content = $fragment->parse('core/page/grid.php');
$fragment = new rex_fragment();
$fragment->setVar('title', rex_i18n::msg('system_features'));
$fragment->setVar('body', $content, false);
echo $fragment->parse('core/page/section.php');
$content = [];
$formElements = [];
$n = [];
$n['label'] = '<label for="rex-id-server">' . rex_i18n::msg('server') . '</label>';
$n['field'] = '<input class="form-control" type="text" id="rex-id-server" name="settings[server]" value="' . htmlspecialchars(rex::getServer()) . '" />';
示例2: checkDb
/**
* Checks the version of the connected database server.
*
* @param array $config of databaes configs
* @param bool $createDb Should the database be created, if it not exists.
*
* @return string Error
*/
public static function checkDb($config, $createDb)
{
$err = rex_sql::checkDbConnection($config['db'][1]['host'], $config['db'][1]['login'], $config['db'][1]['password'], $config['db'][1]['name'], $createDb);
if ($err !== true) {
return $err;
}
$serverVersion = rex_sql::getServerVersion();
if (rex_string::versionCompare($serverVersion, self::MIN_MYSQL_VERSION, '<') == 1) {
return rex_i18n::msg('setup_404', $serverVersion, self::MIN_MYSQL_VERSION);
}
return '';
}