本文整理汇总了PHP中Errors::showError方法的典型用法代码示例。如果您正苦于以下问题:PHP Errors::showError方法的具体用法?PHP Errors::showError怎么用?PHP Errors::showError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Errors
的用法示例。
在下文中一共展示了Errors::showError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: file_get_contents
if ($version > '4.1' && $charset) {
$db->query($set_names);
}
if ($version > '5.0') {
$db->query($set_modes);
}
$sqls = file_get_contents($schema_common_path . "mysql.sql");
$r = sql_run($sqls);
if (!$r) {
Errors::showError(mysql_error(), 'db');
exit;
}
$must_sql_data = file_get_contents($schema_path . "mysql.data.sql");
$r = sql_run($must_sql_data);
if (!$r) {
Errors::showError(mysql_error(), 'db');
exit;
}
$structure_sql_data1 = file_get_contents($schema_common_path . "mysql.data.area.sql");
$r = sql_run($structure_sql_data1);
$structure_sql_data2 = file_get_contents($schema_common_path . "mysql.data.industry.sql");
$r = sql_run($structure_sql_data2);
@touch(PHPB2B_ROOT . './data/install.lock');
if (!empty($testdata)) {
$source = "data/attachment/sample";
$dest = "../attachment/sample";
$sqls = file_get_contents($schema_path . "mysql.sample.sql");
sql_run($sqls);
dir_copy($source, $dest, 1);
} else {
//basic datas
示例2: TemplateEngines
$smarty = new TemplateEngines();
$includes = array(CLASS_PATH . 'logger.class.php', CLASS_PATH . 'plugin.class.php', LIB_PATH . 'core/object.php', LIB_PATH . 'core/model.php', LIB_PATH . 'core/controller.php', LIB_PATH . 'core/view.php');
foreach ($includes as $inc) {
require $inc;
}
$log = new Logger();
$plugin = new PluginManager();
$connected = $pdb->Connect($dbhost, $dbuser, $dbpasswd, $dbname);
if (!$connected or empty($connected)) {
$msg = L("db_conn_error", 'msg', $pdb->ErrorMsg());
$msg .= "<br />" . L("db_conn_error_no", 'msg', $pdb->ErrorNo());
if (!file_exists(DATA_PATH . "install.lock")) {
$msg .= "<br /><a href='" . URL . "install/install.php'>" . L("please_reinstall_program", "msg") . "</a>";
}
require CLASS_PATH . "error.class.php";
Errors::showError($msg, 'db');
exit;
}
if ($dbcharset) {
$pdb->Execute("SET NAMES '{$dbcharset}'");
}
//caches check
if (!file_exists(CACHE_COMMON_PATH . "cache_setting.php")) {
require LIB_PATH . "cache.class.php";
$cache = new Caches();
if ($cache->cacheAll()) {
$msg .= "<a href='" . pb_getenv('REQUEST_URI') . "'>Cached successfully, please refresh.</a>";
header_sent($msg);
exit;
}
}