-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.php
More file actions
26 lines (23 loc) · 843 Bytes
/
Copy pathindex.php
File metadata and controls
26 lines (23 loc) · 843 Bytes
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
<?php
ob_start();
define('APP_DEBUG', TRUE); // 开启调试模式
$url_ext_name = substr($_SERVER['REQUEST_URI'], -4);
if (in_array($url_ext_name, array('.jpg', '.pdf', '.gif', '.png', '.doc', '.exe', '.css')) || substr($_SERVER['REQUEST_URI'], -3) == '.js') {
header("HTTP/1.0 404 Not Found");
exit;
}
// 解决uploadify在火狐下session_id丢失的问题
if (isset($_COOKIE['PHPSESSID']) && $_COOKIE['PHPSESSID'])
{
session_id($_COOKIE['PHPSESSID']);
}
if (isset($_REQUEST['PHPSESSID']) && $_REQUEST['PHPSESSID']) {
session_id($_REQUEST['PHPSESSID']);
}
if (isset($_GET['PHPSESSID']) && $_GET['PHPSESSID']) {
session_id($_GET['PHPSESSID']);
}
if (isset($_POST['PHPSESSID']) && $_POST['PHPSESSID']) {
session_id($_POST['PHPSESSID']);
}
require realpath('.') . DIRECTORY_SEPARATOR . 'frame' . DIRECTORY_SEPARATOR . 'entrance.php';