thinkPHP地址URL跳转问题

来源:互联网 发布:云图制作软件 编辑:程序博客网 时间:2024/05/29 07:20

__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方法








原创粉丝点击