1、中转程序include.inc
复制代码 代码如下:
include_once 'include/Base.php';
$path = '';
$url = isBase::decrypt(urlDecode($_SERVER['QUERY_STRING']));
parse_str($url); //获取通过url地址GET传递过来的变量
if(!empty($_POST['path'])){ //获取POST传递过来的变量
$path = $_POST['path'];
$path = isBase::decrypt(urlDecode($path));
}
//解析真实路径
if(empty($path)){
//header("Location: login.php");
exit;
}
if(!preg_match("/(^http:\/)|([?|&|=])/",$path)){
//跳转到实际执行文件的路径
chdir(dirname($path));
include_once basename($path);
exit;
}
?>
复制代码 代码如下:
include include.inc;
?>
复制代码 代码如下:
"index.php?".encrypt("path=/test/test.php&test=123&test2=4321")