Home  >  Article  >  Backend Development  >  Thinkphp的url模式如何用

Thinkphp的url模式如何用

WBOY
WBOYOriginal
2016-06-13 10:18:23800browse

Thinkphp的url模式怎么用啊
刚开始学think
看了下think好像有4个模式,有什么普通模式、pathinfo什么的,那一般用哪个啊?
还有如果用表单传值的话表单里的action要怎么填?

比如有 index.php/index/index 那表单里怎么写?
如果以后模式要改成 index.php?a=xx&m=xx的话,那不是所有的表单都要修改?

------解决方案--------------------
用哪种模式你自己决定,不过pathinfo模式比较友好一点

记得tp里面有个U方法,所有模板里面用U方法生成链接:link

它会根据你配置的模式自动生成相应的url

Statement:
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