Home > Backend Development > PHP Tutorial > thinkphp,执行哪个方法

thinkphp,执行哪个方法

WBOY
Release: 2016-06-23 14:23:37
Original
1020 people have browsed it

thinkphp url

thinkphp框架,有个index.class.php文件,对应一个index.html文件。index.class.php文件有两个方法,一个index()和order()方法。index.html文件的action为__URL__/index时,执行index()方法,为什么才能执行order方法

回复讨论(解决方案)

就是有两个function,一个是function index()另一个是function order(),怎样选择执行哪个

__URL__/order

__URL__/order
这个办法不行,执行不了order方法

是index()方法对应index.html文件,order()方法就要在建个order.html页面。U('Index/order');

不太明白你的意思。可以考虑把方法order()放到方法index()中

Related labels:
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