-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
72 lines (59 loc) · 1.81 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
//vim:set expandtab tabstop=4 shiftwidth=4 softtabstop=4 foldcolumn=1 foldmethod=marker:
/**
* Project Name: 5anet(BBS)
* File Name : index.php
*
* The main input file
*
* This file will received all user's request. and parse user's action
* and resend the user's action to a action component. and response the result
* by the action component.
*
* PHP Version 5
*
* @package: NULL
* @author: Mike.G Chinese Name: 黄叶 <hylinux@gmail.com>
* @license: http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @copyright: http://www.5anet.com
* @version: $Id: index.php,v 1.2 2006-09-24 14:38:08 ghw Exp $
* @date: $Date: 2006-09-24 14:38:08 $
*/
/**
* Check the install.php
* if the install.php eixts. we will exit
*/
if ( file_exists("install.php") or file_exists("install") ) {
die("After we had installed the 5anet(BBS), please remove the install.php<br>
当安装完5anet(BBS)后,请删除install.php,然后刷新页面<br>");
}
//open the cache system
ob_start();
//open the session system
session_start();
# include the configure file
if ( file_exists( './config/config.inc.php' ) ) {
include_once './config/config.inc.php';
} else {
die("Can't open the configure file.\n");
}
if ( file_exists( './global.inc.php' ) ) {
include_once './global.inc.php';
} else {
die("Can't open the global file.\n");
}
if ( get_magic_quotes_runtime() ) {
set_magic_quotes_runtime(false);
}
# include the application defined file
if ( file_exists(CLASS_PATH.'/main/Application.class.php') ) {
include_once CLASS_PATH.'/main/Application.class.php';
} else {
die("Can't include the Application defined file.\n");
}
# defined a Application instance, and run this Application
$app = Application::getInstance();
$app->run();
//flush the page cache
ob_end_flush();
?>