[复制到剪切板]
<?php
$Var="hello php";//修改为$Var=" hello php";试试得到什么结果
$post= "receive.php?Name=".$Var;
header("location:$post");
?>
phpma
receive.php的内容:
<?PHP
Echo "<pre>";
Echo $_GET["Name"];
Echo "</pre>";
?>
正确的方法是:
<?php
$Var="hello php";
$post= "receive.php?Name=".urlencode($Var);
header("location:$post");
?>
phpma
在接收页面你不需要使用Urldecode(),变量会自动编码.
5:如何截取指定长度汉字而不会出现以"?>[/code]"结尾,超出部分以"..."代替
(阅读次数:)
共15页: 上一页 [1] [2] 3 [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] 下一页