[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 源代码 application_top.php
<?php
/**
* @package Installer
* @access private
* @copyright Copyright 2003-2014 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 Tue Apr 15 14:38:57 2014 -0400 Modified in v1.5.3 $ */
/**
* ensure odd settings are disabled and set required defaults
*/
//@ini_set("session.auto_start","0");
//@ini_set("session.use_trans_sid","0");
@ini_set("arg_separator.output","&");
// Check PHP version
if (version_compare(PHP_VERSION, '5.2.10', '<'))
{
require('includes/templates/template_default/templates/tpl_php_version_problem.php');
die('');
}
/**
* Set the local configuration parameters - mainly for developers
*/
if (file_exists('includes/local/configure.php')) {
/**
* load any local(user created) configure file.
*/
include('includes/local/configure.php');
}
/**
* Set the installer configuration parameters
*/
include('includes/installer_params.php');
/**
* set the level of error reporting
*/
error_reporting(version_compare(PHP_VERSION, 5.3, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE : version_compare(PHP_VERSION, 5.4, '>=') ? E_ALL & ~E_DEPRECATED & ~E_NOTICE & ~E_STRICT : E_ALL & ~E_NOTICE);
$debug_logfile_path = DEBUG_LOG_FOLDER . '/zcInstallDEBUG-' . time() . '-' . mt_rand(1000,999999) . '.log';
@ini_set('log_errors', 1);
@ini_set('log_errors_max_len', 0);
@ini_set('error_log', $debug_logfile_path);
if (defined('STRICT_ERROR_REPORTING') && STRICT_ERROR_REPORTING == true) {
@ini_set('display_errors', 1); // to screen
} else {
@ini_set('display_errors', 0);
}
/**
* Timezone problem detection
*/
if (PHP_VERSION >= '5.3' && ini_get('date.timezone') == '' && @date_default_timezone_get() == '')
{
include ('../includes/extra_configures/set_time_zone.php');
} elseif (PHP_VERSION >= '5.1') {
$baseTZ = date_default_timezone_get();
date_default_timezone_set($baseTZ);
unset($baseTZ);
}
// re-test
if (ini_get('date.timezone') == '' && @date_default_timezone_get() == '')
{
die('ERROR: date.timezone is not set in php.ini. You have two options: 1-Edit /includes/extra_configures/set_time_zone.php to set the $TZ variable manually, or 2-Contact your hosting company to set the timezone correctly in the server PHP configuration before continuing.');
} else
{
@date_default_timezone_set(date_default_timezone_get());
}
/*
* check settings for, and then turn off magic-quotes support, for both runtime and sybase, as both will cause problems if enabled
*/
if (version_compare(PHP_VERSION, 5.4, '<')) {
$php_magic_quotes_runtime = (@get_magic_quotes_runtime() > 0) ? 'ON' : 'OFF';
if (version_compare(PHP_VERSION, 5.3, '<') && function_exists('set_magic_quotes_runtime')) set_magic_quotes_runtime(0);
$val = @ini_get('magic_quotes_sybase');
if (is_string($val) && strtolower($val) == 'on') $val = 1;
$php_magic_quotes_sybase = ((int)$val > 0) ? 'ON' :'OFF';
if ((int)$val != 0) @ini_set('magic_quotes_sybase', 0);
unset($val);
}
/**
* boolean used to see if we are in the admin script, obviously set to false here.
*/
if (!defined('IS_ADMIN_FLAG')) define('IS_ADMIN_FLAG', false);
// define the project version
require('version.php');
/**
* require the session handling functions
*/
if (!defined('STORE_SESSIONS')) define('STORE_SESSIONS', 'file');
require('includes/functions/sessions.php');
/**
* set the session name and save path
*/
zen_session_name('zenInstallId');
zen_session_save_path(SESSION_WRITE_DIRECTORY);
/**
* set the session cookie parameters
*/
session_set_cookie_params(0, '/');
/**
* set the session ID if it exists
*/
if (isset($_POST[zen_session_name()])) {
zen_session_id($_POST[zen_session_name()]);
} elseif ( ($request_type == 'SSL') && isset($_GET[zen_session_name()]) ) {
zen_session_id($_GET[zen_session_name()]);
}
zen_session_start();
$session_started = true;
/*
* initialize the message stack for message alerts
*/
require('includes/classes/message_stack.php');
$messageStack = new messageStack;
/*
* activate installer
*/
require('includes/classes/installer.php');
$zc_install = new installer;