1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-27 11:10:19 +00:00

1、增加cookiejar支持

2、增加Setting结构,便于统一设置请求参数
3、增加服务端测试php脚本
This commit is contained in:
CurveSoft
2014-06-03 21:20:10 +08:00
parent 03080b3ef2
commit ebb3b91df9
3 changed files with 174 additions and 40 deletions

26
httplib/httplib_test.php Normal file
View File

@ -0,0 +1,26 @@
<?php
session_id() or session_start();
if (!isset($_SESSION['first_time'])) {
$_SESSION['first_time'] = time();
}
$data = array();
$HTTP = array();
foreach ($_SERVER as $head => $value) {
if (strpos($head, "HTTP_") === 0) {
$HTTP[$head] = $value;
}
}
$data['HTTP'] = $HTTP;
$data['GET'] = $_GET;
$data['POST'] = $_POST;
$data['REQUEST'] = $_REQUEST;
$data['SESSION'] = $_SESSION;
$data['COOKIE'] = $_COOKIE;
$data['FILES'] = $_FILES;
$data['SERVER'] = $_SERVER;
$data['ENV'] = $_ENV;
//echo json_encode($data);
//echo "<pre>";
print_r($data);
//echo "</pre>";