栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

微信小程序tp5开发(2) 环境的搭建

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

微信小程序tp5开发(2) 环境的搭建

假设您已安装了composer ,使用composer安装tp5用下面的命令
composer create-project topthink/think project --prefer-dist

目录给结为:
D:.
├─application
│ └─index
│ └─controller
├─extend
├─public
│ └─static
├─runtime
├─thinkphp
│ ├─lang
│ ├─library
│ │ ├─think
│ │ │ ├─cache
│ │ │ │ └─driver
│ │ │ ├─config
│ │ │ │ └─driver
│ │ │ ├─console
│ │ │ │ ├─bin
│ │ │ │ ├─command
│ │ │ │ │ ├─make
│ │ │ │ │ │ └─stubs
│ │ │ │ │ └─optimize
│ │ │ │ ├─input
│ │ │ │ └─output
│ │ │ │ ├─descriptor
│ │ │ │ ├─driver
│ │ │ │ ├─formatter
│ │ │ │ └─question
│ │ │ ├─controller
│ │ │ ├─db
│ │ │ │ ├─builder
│ │ │ │ ├─connector
│ │ │ │ └─exception
│ │ │ ├─debug
│ │ │ ├─exception
│ │ │ ├─log
│ │ │ │ └─driver
│ │ │ ├─model
│ │ │ │ └─relation
│ │ │ ├─paginator
│ │ │ │ └─driver
│ │ │ ├─process
│ │ │ │ ├─exception
│ │ │ │ └─pipes
│ │ │ ├─response
│ │ │ ├─session
│ │ │ │ └─driver
│ │ │ ├─template
│ │ │ │ ├─driver
│ │ │ │ └─taglib
│ │ │ └─view
│ │ │ └─driver
│ │ └─traits
│ │ ├─controller
│ │ ├─model
│ │ └─think
│ └─tpl
└─vendor
├─composer
└─topthink
└─think-installer
└─src
application是我们应用程序的保存目录,命名规则要按约定进行。
vendor是第三方的模块。
public则是我们运行目录 。
入口文件是目录的public 下的 index.php

//
+----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
//
+----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
//
+----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
//
+----------------------------------------------------------------------
// | Author: liu21st liu21st@gmail.com
//
+----------------------------------------------------------------------

// [ 应用入口文件 ]

// 定义应用目录
define('APP_PATH', DIR . '/../application/');
// 加载框架引导文件
require DIR . '/../thinkphp/start.php';

我们用tp5内置的SERVER进行开发。

PS D:thinkphp5shop> cd .public
PS D:thinkphp5shoppublic> php -S localhost:8090 router.php
PHP 5.6.14 Development Server started at Wed Aug 30 16:28:44 2017
Listening on http://localhost:8090
document root is D:thinkphp5shoppublic
Press Ctrl-C to quit.
运行起来了

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/230209.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号