thinkPHP地址URL跳转问题
__URL__: 会替换成当前模块的URL地址(__APP__/order)
__APP__: 会替换成当前项目的URL地址 (__APP__/Index/order)
__ROOT__: 会替换成当前网站的地址(__ROOT__/Admin/Lib/Index/order)
__PUBLIC__:会被替换成当前网站的公共目录 (__PUBLIC__/js/jquery-weui.js)
1、thinkPHP在同一个类里,函数之间如何调用
IndexAction.class.php文件 class IndexAction extends Action { public function one{ $params = array(); $this->two( $params ); //在one()里调用函数two() } public function two{ var_dump($params);die(); } }
2、HTML页面,跳到两个Action(IndexAction.class.php 和 YajinAction.class.php)
<!DOCTYPE html> <html> <head> <title></title> <head> <body> <div > <a href="__APP__/Index/workorder" > //跳转到IndexAction.class.php下的workorder()函数 </div> <div > <a href="__APP__/Yajin/index" > //跳转到YajinAction.class.php下的index()函数 </div> </body> <html>
3、两个Action之间的跳转(IndexAction.class.php 和 YajinAction.class.php)
$re = D("Yajin") -> check( $params ); //调用Yajin模块下的check方法
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇: PHP将两个数组合并成一个数组
- 下一篇: PHP中计算二维数组中某一元素之和