Exemple #1
0
 /**
  * Class constructor
  *
  * Sets the $config data from the primary config.php file as a class variable.
  *
  * FA_Config constructor.
  */
 public function __construct()
 {
     $this->config =& get_config();
     /**
      * Set the base_url automatically if none was provided
      */
     if (empty($this->config['base_url'])) {
         $base_url = get_http_host() . '/';
         $this->set_item('base_url', $base_url);
     }
     log_message(MSG_INFO, 'Config Class Initialized');
 }
Exemple #2
0
<?php

/**
 * 系统维护
 */
if (false) {
    require_once BASEPATH . '/core/Common.php';
    //设置网站重新开启时间
    $date = '2015-08-31 23:00:00';
    //格式化开启时间
    $date_str = date('Y年m月d日 H:i', strtotime($date));
    //格式化开启时间的毫秒数
    $system_date = strtotime($date) * 1000;
    //系统维护界面图片地址
    $search = array('admin', 'student', 'demo', 'public', 'exam');
    $replace = array('s', 's', 's', 's', 's');
    $http_host = get_http_host();
    $server_port = get_server_port();
    $http_url = str_replace($search, $replace, 'http://' . $http_host);
    if ($server_port != 80) {
        $http_url .= ':' . $server_port;
    }
    include "../common/main.php";
    exit;
}
Exemple #3
0
 * ECSHOP 前台公用文件
 * ============================================================================
 * 版权所有 (C) 2005-2008 康盛创想(北京)科技有限公司,并保留所有权利。
 * 网站地址: http://www.ecshop.com;http://www.comsenz.com
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用;不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
 * $Author: liubo $
 * $Id: lib_maifou.php 5885 2009-02-16 05:09:07Z liubo $.
 */
if (!defined('IN_ECS')) {
    die('Hacking attempt');
}
#require_once ROOT_PATH . 'includes/config.inc.php';
define('HTTP_HOST', get_http_host());
/**
 * 初始化参数函数.
 *
 * @return array
 *               array('domain', 'db_name')
 */
function base_init($check_locked = '1')
{
    $domain = base_get_domain();
    $db_name = $GLOBALS['db_prefix'] . $domain;
    $siteinfo = base_get_siteinfo($domain);
    if ($siteinfo == 'is_old') {
        maifou_showmsg('对不起,该独立网店已经停止营业。<br />');
    }
    if ($siteinfo == false) {
Exemple #4
0
 function host_url()
 {
     $host_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
     $host_url .= '://' . get_http_host();
     return $host_url;
 }
}
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
|	http://example.com/
|
| If this is not set then CodeIgniter will guess the protocol, domain and
| path to your installation.
|
*/
$config['base_url'] = "http://" . get_http_host();
/*
 |--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';
/*
 * 全局静态资源存放域名
*/
if (ENVIRONMENT == 'production') {
Exemple #6
0
<?php

if (!defined('IN_MSAPP')) {
    exit('Access Deny!');
}
preg_match('/(.*)\\/(.*)\\.php\\/?(.*)?/', $_SERVER['REQUEST_URI'], $match);
// 定义base path
define('__BASEPATH__', get_http_host() . (isset($match[1]) ? $match[1] . '/' : '/'));
// 定义public path
define('__PUBLIC__', __BASEPATH__ . 'public/');
// 定义upload path
define('__UPLOAD__', __BASEPATH__ . 'upload/');
// 定义base uri
define('__BASEURI__', isset($match[2]) ? __BASEPATH__ . $match[2] . '.php/' : '/index.php/');
// 解析path_info
$path = explode('/', $_SERVER['PATH_INFO']);
// 定义module
define('__MODULE__', isset($path[1]) && trim($path[1]) != '' ? $path[1] : 'default');
// 定义action
define('__ACTION__', isset($path[2]) && trim($path[2]) != '' ? $path[2] : 'index');