urlencode.php

来源:互联网 发布:mac safari 清除缓存 编辑:程序博客网 时间:2024/05/17 17:18

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> urlencode.php </title>
  <meta charset="UTF-8">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 </head>

 <body>
<?php
echo '<a href="urlencode.php?foo=', urlencode("张三"), '">张三</a>';
?>

<hr>
<?php
if(isset($_GET))
{
 var_dump($_GET);
}
?>
 </body>
</html>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> urlencode.php </title>
  <meta charset="UTF-8">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
 </head>

 <body>
<a href="urlencode.php?foo=%E5%BC%A0%E4%B8%89">张三</a>
<hr>
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b>
  'foo' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'张三'</font> <i>(length=6)</i>
</pre> </body>
</html>

http://localhost/myphp/urlencode.php?foo=%E5%BC%A0%E4%B8%89


张三
array
  'foo' => string '张三' (length=6)


0 0