urldecode.php
2016-05-09 10:31
351 查看
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> urldecode.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//要配合提交页面一起使用
$a = explode('&', $QUERY_STRING);
$i = 0;
while ($i < count($a)) {
$b = @split('=', $a[$i]);
echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])), ' is ', htmlspecialchars(urldecode($b[1])), "<br />\n";
$i++;
}
?>
</body>
</html>
http://localhost/myphp/urldecode.php?foo=%E5%BC%A0%E4%B8%89
Value for parameter foo is 张三
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> urldecode.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//要配合提交页面一起使用
var_dump($QUERY_STRING);
$a = explode('&', $QUERY_STRING);
var_dump($a);
$i = 0;
while ($i < count($a)) {
$b = @split('=', $a[$i]);
echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])), ' is ', htmlspecialchars(urldecode($b[1])), "<br />\n";
$i++;
}
?>
</body>
</html>
http://localhost/myphp/urldecode.php?foo=%E5%BC%A0%E4%B8%89&barfoo=%E5%BC%A0%E4%B8%89
string 'foo=%E5%BC%A0%E4%B8%89&barfoo=%E5%BC%A0%E4%B8%89' (length=48)
array
0 => string 'foo=%E5%BC%A0%E4%B8%89' (length=22)
1 => string 'barfoo=%E5%BC%A0%E4%B8%89' (length=25)
Value for parameter foo is 张三
Value for parameter barfoo is 张三
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> urldecode.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//要配合提交页面一起使用
var_dump($QUERY_STRING);
$a = explode('&', $QUERY_STRING);
var_dump($a);
$i = 0;
while ($i < count($a)) {
$b = @split('=', $a[$i]);
echo 'Value for parameter ', $b[0], ' is ',$b[1], "<br />\n";
$i++;
}
?>
</body>
</html>
string 'foo=%E5%BC%A0%E4%B8%89&barfoo=%E5%BC%A0%E4%B8%89' (length=48)
array
0 => string 'foo=%E5%BC%A0%E4%B8%89' (length=22)
1 => string 'barfoo=%E5%BC%A0%E4%B8%89' (length=25)
Value for parameter foo is %E5%BC%A0%E4%B8%89
Value for parameter barfoo is %E5%BC%A0%E4%B8%89
<html>
<head>
<title> urldecode.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//要配合提交页面一起使用
$a = explode('&', $QUERY_STRING);
$i = 0;
while ($i < count($a)) {
$b = @split('=', $a[$i]);
echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])), ' is ', htmlspecialchars(urldecode($b[1])), "<br />\n";
$i++;
}
?>
</body>
</html>
http://localhost/myphp/urldecode.php?foo=%E5%BC%A0%E4%B8%89
Value for parameter foo is 张三
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> urldecode.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//要配合提交页面一起使用
var_dump($QUERY_STRING);
$a = explode('&', $QUERY_STRING);
var_dump($a);
$i = 0;
while ($i < count($a)) {
$b = @split('=', $a[$i]);
echo 'Value for parameter ', htmlspecialchars(urldecode($b[0])), ' is ', htmlspecialchars(urldecode($b[1])), "<br />\n";
$i++;
}
?>
</body>
</html>
http://localhost/myphp/urldecode.php?foo=%E5%BC%A0%E4%B8%89&barfoo=%E5%BC%A0%E4%B8%89
string 'foo=%E5%BC%A0%E4%B8%89&barfoo=%E5%BC%A0%E4%B8%89' (length=48)
array
0 => string 'foo=%E5%BC%A0%E4%B8%89' (length=22)
1 => string 'barfoo=%E5%BC%A0%E4%B8%89' (length=25)
Value for parameter foo is 张三
Value for parameter barfoo is 张三
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> urldecode.php </title>
<meta charset="UTF-8">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<?php
//要配合提交页面一起使用
var_dump($QUERY_STRING);
$a = explode('&', $QUERY_STRING);
var_dump($a);
$i = 0;
while ($i < count($a)) {
$b = @split('=', $a[$i]);
echo 'Value for parameter ', $b[0], ' is ',$b[1], "<br />\n";
$i++;
}
?>
</body>
</html>
string 'foo=%E5%BC%A0%E4%B8%89&barfoo=%E5%BC%A0%E4%B8%89' (length=48)
array
0 => string 'foo=%E5%BC%A0%E4%B8%89' (length=22)
1 => string 'barfoo=%E5%BC%A0%E4%B8%89' (length=25)
Value for parameter foo is %E5%BC%A0%E4%B8%89
Value for parameter barfoo is %E5%BC%A0%E4%B8%89
相关文章推荐
- ubuntu php编译安装 openssl/evp.h: 没有那个文件或目录
- PHP培训实战教程之PHP函数
- PHP之误解
- PHP面向对象的进阶学习(抽像类、接口、final、类常量)
- urlencode.php
- php多文件上传
- sftp 限制用户登陆指定目录(家目录)
- PHP 使用 password_hash() 给密码加密
- Ubuntu PHP 环境配置
- php文件操作小结(删除指定文件/获取文件夹下的文件名/读取文件夹下图片名)
- php自动提交表单的方法(基于fsockopen与curl)
- SMTP客户端未通过身份验证等多种错误解决方案分享
- showdetail2.php
- showdetail.php
- thinkphp---静态前端页面与TP框架整合
- 每天laravel-20160802| Container -5
- 每天laravel-20160802| Container -5
- php简单实现多语言切换的方法
- 深入浅析PHP无限极分类的案例教程
- PHP实现的加密解密处理类