Skip to content
This repository has been archived by the owner on Jan 4, 2020. It is now read-only.

Commit

Permalink
修正U函数一处错误
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Mar 18, 2016
1 parent 352a4e6 commit eebad03
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ThinkPHP/Common/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,16 +332,16 @@ function I($name, $default = '', $filter = null, $datas = null)
break;
case 'param':
switch ($_SERVER['REQUEST_METHOD']) {
case 'POST':
case 'POST':
$input = $_POST;
break;
case 'PUT':
case 'PUT':
if (is_null($_PUT)) {
parse_str(file_get_contents('php://input'), $_PUT);
}
$input = $_PUT;
break;
default:
default:
$input = $_GET;
}
break;
Expand Down Expand Up @@ -419,19 +419,19 @@ function I($name, $default = '', $filter = null, $datas = null)
}
if (!empty($type)) {
switch (strtolower($type)) {
case 'a': // 数组
case 'a': // 数组
$data = (array) $data;
break;
case 'd': // 数字
case 'd': // 数字
$data = (int) $data;
break;
case 'f': // 浮点
case 'f': // 浮点
$data = (float) $data;
break;
case 'b': // 布尔
case 'b': // 布尔
$data = (boolean) $data;
break;
case 's': // 字符串
case 's':// 字符串
default:
$data = (string) $data;
}
Expand Down Expand Up @@ -1090,7 +1090,7 @@ function U($url = '', $vars = '', $suffix = true, $domain = false)
}
}
if (isset($var[$varModule])) {
$module = defined('BIND_MODULE') && BIND_MODULE == $module ? '' : $var[$varModule];
$module = defined('BIND_MODULE') && BIND_MODULE == $var[$varModule] ? '' : $var[$varModule];
unset($var[$varModule]);
}

Expand Down

0 comments on commit eebad03

Please sign in to comment.