Score
0
Watch 639 Star 1.5K Fork 814

GVPIBOS开源OA协同办公管理 / IBOSPHPLGPL-3.0

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
基于Yii和bootstrap的开源OA/协同办公平台,连接全平台覆盖的酷办公客户端(Win,IOS,Android,Mac,Linux),支撑您的企业管理二次开发--作为国内首家开源OA,有的不只是颜值 spread retract

http://www.ibos.com.cn

  • PHP 58.1%
  • JavaScript 35.5%
  • CSS 3.9%
  • HTML 2.3%
  • Hack 0.2%
Clone or download
index.php 1.88 KB
Copy Edit Web IDE Raw Blame History
seekArt authored 2017-03-14 15:58 . 更新新版用户选择器
<?php
/**
* 索引页
*
* @link http://www.ibos.com.cn/
* @copyright Copyright &copy; 2012-2014 IBOS Inc
* @author banyanCheung <banyan@ibos.com.cn>
*/
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
die('require PHP > 5.3.0 !');
}
// 程序根目录路径
define('PATH_ROOT', dirname(__FILE__));
if ($_SERVER['HTTP_HOST'] == 'saas.ibos.cn') {
include PATH_ROOT . '/login.php';
die;
}
$defines = PATH_ROOT . '/system/defines.php';
$yii = PATH_ROOT . '/library/yii.php';
$config = PATH_ROOT . '/system/config/common.php';
require_once ( $defines );
require_once ( $yii );
require_once PATH_ROOT . '/library/globals.php';
Yii::setPathOfAlias('application', PATH_ROOT . DIRECTORY_SEPARATOR . 'system');
$str = strtolower($_SERVER['SERVER_SOFTWARE']);
list($server) = explode('/', $str);
if ($server == "apache" || $server == "nginx" || $server == "lighttpd") {
if (isset($_SERVER['HTTP_ORIGIN'])) {
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
}
header('Access-Control-Allow-Headers: Origin, Accept, Content-Type, Authorization, ISCORS');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE');
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
exit();
}
} else if ($server == "iis") {
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
// CORS 设置,有待讨论
if (isset($_SERVER['HTTP_ORIGIN'])) {
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);
}
header('Access-Control-Allow-Headers: Origin, Accept, Content-Type, Authorization, ISCORS');
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Methods: POST, GET, PUT, OPTIONS, DELETE');
exit();
}
}
Yii::createApplication('application\core\components\Application', $config)->run();
exit;
PHP
1
https://gitee.com/ibos/IBOS.git
git@gitee.com:ibos/IBOS.git
ibos
IBOS
IBOS
master

Help Search