本文整理汇总了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 '';
}