码迷,mamicode.com
首页 > Web开发 > 详细

ThinkPHP代码

时间:2015-10-01 11:28:32      阅读:191      评论:0      收藏:0      [点我收藏+]

标签:

// 1. Home module: Common Conf Controller index.html Modle View
// 2. The code is Controller/IndexController.class.php
// 3. 入口文件,index.php

define(‘APP_DEBUG‘,true);
define(‘BIND_MODULE‘,‘User‘); // I create it.
define(‘CONF_EXT‘,‘.yaml‘); // I create it.
define(‘APP_PATH‘,‘./Application/‘);
require ‘./ThinkPHP/ThinkPHP.php‘;

// 4. thinkphp directory 
     Application >> Common >> Home >> Public >> Runtime >> ThinkPHP >> Composer.json >> index.php >> README.md >> #index.php#
// 5. Application directory
     Common >> Home >> Runtime >> User >> index.html >> README.md
    Home directory
     Common >> Config >> Controller >> Model >> View >> index.html

// 6. ThinkPHP directory
     Common >> Conf >> Lang >> Library >> Mode >> Tpl >> LICENSE.txt >> logo.png >> ThinkPHP.php
// 5. 怎么让emacs不生成 #index.php# 文件
<?php namespace Home\Controller; use Think\Controller; class IndexController extends Controller{ public function index(){ // $config = C(‘‘); // dump($config); 输出$config的结果 echo "index<br>"; } public function _before_index(){ echo "index.before<br>"; } public function _after_index(){ echo "index.after<br>"; } // public function list(){ // echo "list"; // } }

 

ThinkPHP代码

标签:

原文地址:http://www.cnblogs.com/htmlphp/p/4850783.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!