Giter Site home page Giter Site logo

thinkphp_learn's Introduction

thinkphp_learn

JUST FOR FUN !

define ('APP_PATH', './PloverUAV/');

可以定义自己的应用目录,实现多个应用用一个ThinkPHP。

$this->display('./index');

这是个很诡异的方法,会在当前模块下的视图目录下的控制器目录找index.html ./表示当前目录下的,../表示上一层目录下的。

tp.local/home/register/register

应用目录/模块/控制器/方法 直接用控制器来控制调用,用方法来显示 其他的后台处理都在Model上面

$model = C('WHERE_IS');

应用配置参数,使用C方法获取参数 一般此参数在Conf/config.php中设置 要在View中用,使用$this->assign('where_is', $model);

实例化数据库模块M和D方法

继承数据库模块的类UserModel,对应User表 Model类的方法中可以用$this->直接调用该数据库 配置数据库的信息在config.php中

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.