zoukankan      html  css  js  c++  java
  • thinkPHP框架学习笔记

    class ZhuantiAction extends Action
    {
        public function index()
        {
        $name = trim($this->_get('name'));//获取http://www.XXXXX.com/home.php/Zhuanti/index/name/20140530的name值,注意URL重写     $this->display();//不写的时候默认时间index.html(后缀在配置中配置)     
    $this->display($name);//写了以后就是$name.html,这样是不需要每个html加一个控制器 } }

     ----------------------------------》

    ThinkPHPExtendLibraryORGUtilRBAC.class.php 用户权限配置扩展模块,用于后台设置用户权限等。

     public function __construct(){内置构造函数
            parent::__construct();//父级构造函数,调用了thinkphp的核心模块的__construct()路径:ThinkPHPLibCoreAction.class.php
            //其他内容
        }

    在Action.class.php中

        public function __construct() {
            tag('action_begin');
            //实例化视图类
            $this->view       = Think::instance('View');
            //控制器初始化
            if(method_exists($this,'_initialize'))
                $this->_initialize();
        }

    不知道怎么用的啊&*(*&……*……&……&¥¥##,只知道如果构造器里面没有链接上对应的方法的话就会调用__construct(),然后能直接指定到对应链接上方法的文件了!囧!!以后一定要解决掉他!~

  • 相关阅读:
    401. Binary Watch
    46. Permutations
    61. Rotate List
    142. Linked List Cycle II
    86. Partition List
    234. Palindrome Linked List
    19. Remove Nth Node From End of List
    141. Linked List Cycle
    524. Longest Word in Dictionary through Deleting
    android ListView详解
  • 原文地址:https://www.cnblogs.com/lichuntian/p/thinkPHP.html
Copyright © 2011-2022 走看看