首页 > PHP模糊查询把搜索的关键词传递到url上的原理是怎样的?

PHP模糊查询把搜索的关键词传递到url上的原理是怎样的?

<form method="post" action="<{url c='main' a='search'}>">
    <input type="text" name="kw" class="search_text fl" placeholder="">
    <input type="submit" class="search_btn fr"  value="搜 索">
</form>

现在模糊查询后是这样localhost/main/search.html
想要实现这种效果localhost/main/search.html?kw="关键词"
kw这个值传到url的原理是怎样的


你把表单方法改成get,就有你要的效果了

【热门文章】
【热门文章】