[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path Zen Cart 源代码 init_database.php
<?php
/**
* Initialise database driver and connect
* see {@link http://www.zen-cart.com/wiki/index.php/Developers_API_Tutorials#InitSystem wikitutorials} for more details.
*
* @package initSystem
* @copyright Copyright 2003-2013 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version GIT: $Id: Author: DrByte Sat Nov 2 00:02:54 2013 -0400 Modified in v1.5.2 $ */
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
/**
* require the query_factory clsss based on the DB_TYPE
*/
require('includes/classes/db/' .DB_TYPE . '/query_factory.php');
$db = new queryFactory();
// Do a quick sanity check that system tables exist
if (defined('SQL_CACHE_METHOD') && SQL_CACHE_METHOD == 'database') {
$sql = "SHOW TABLES LIKE '" . TABLE_DB_CACHE . "'";
} else {
$sql = "SHOW TABLES LIKE '" . TABLE_PROJECT_VERSION . "'";
}
$db->dieOnErrors = FALSE;
$result = $db->Execute($sql, FALSE, FALSE);
if ($result->RecordCount() == 0) {
if (defined('ERROR_DATABASE_MAINTENANCE_NEEDED')) die(ERROR_DATABASE_MAINTENANCE_NEEDED);
die('<a href="http://www.zen-cart.com/content.php?334-ERROR-0071-There-appears-to-be-a-problem-with-the-database-Maintenance-is-required" target="_blank">ERROR 0071: There appears to be a problem with the database. Maintenance is required.</a>');
}
$db->dieOnErrors = TRUE;