本文整理汇总了PHP中SqlParser::connect方法的典型用法代码示例。如果您正苦于以下问题:PHP SqlParser::connect方法的具体用法?PHP SqlParser::connect怎么用?PHP SqlParser::connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SqlParser
的用法示例。
在下文中一共展示了SqlParser::connect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: realpath
} else {
echo "<span class=\"ok\">" . $_lang['ok'] . "</span></p>";
}
}
// open db connection
$setupPath = realpath(dirname(__FILE__));
include "{$setupPath}/setup.info.php";
include "{$setupPath}/sqlParser.class.php";
$sqlParser = new SqlParser($database_server, $database_user, $database_password, str_replace("`", "", $dbase), $table_prefix, $adminname, $adminemail, $adminpass, $database_connection_charset, $managerlanguage, $database_connection_method);
$sqlParser->mode = $installMode < 1 ? "new" : "upd";
//$sqlParser->imageUrl = 'http://' . $_SERVER['SERVER_NAME'] . $base_url . "assets/";
$sqlParser->imageUrl = "assets/";
$sqlParser->imagePath = $base_path . "assets/";
$sqlParser->fileManagerPath = $base_path;
$sqlParser->ignoreDuplicateErrors = true;
$sqlParser->connect();
// install/update database
echo "<p>" . $_lang['setup_database_creating_tables'];
if ($moduleSQLBaseFile) {
$sqlParser->process($moduleSQLBaseFile);
// display database results
if ($sqlParser->installFailed == true) {
$errors += 1;
echo "<span class=\"notok\"><b>" . $_lang['database_alerts'] . "</span></p>";
echo "<p>" . $_lang['setup_couldnt_install'] . "</p>";
echo "<p>" . $_lang['installation_error_occured'] . "<br /><br />";
for ($i = 0; $i < count($sqlParser->mysqlErrors); $i++) {
echo "<em>" . $sqlParser->mysqlErrors[$i]["error"] . "</em>" . $_lang['during_execution_of_sql'] . "<span class='mono'>" . strip_tags($sqlParser->mysqlErrors[$i]["sql"]) . "</span>.<hr />";
}
echo "</p>";
echo "<p>" . $_lang['some_tables_not_updated'] . "</p>";