Home > Backend Development > PHP Tutorial > 表单get传参是怎么包装URl的?

表单get传参是怎么包装URl的?

WBOY
Release: 2016-06-20 12:28:55
Original
1258 people have browsed it

如图  这是正常的表单get提交 参数是时间格式 2016-5-12  参数在提交时候自动转化了 在action文件那边直接$_get  就获取正常数据:2016-5-12    php有没有类似的函数 现在我想用a链接传参时间 由于url设置问题一直都是只获取2016  现在不想用urlencode()等函数 也不想转成时间戳来传  因为在action那边的文件不想加解码或者转换的函数   要怎么样才能实现表单get提交的效果呢??


回复讨论(解决方案)

xxxxx

xxxxx

 我的URL分界符就是“  -   ”    所以一直都是这样传只能获取为2016  后面的就没了

2016%2F05%2F04 是 2016/05/04 而不是2016-05-04

这样很正常,不需要encode

<a href="server.php?date=2016-05-04">go</a>
Copy after login


<?phpprint_r($_GET['date']);?>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template