Thinkphp5学习 Windows下的安装

 

 

方法一、通过官方网站直接下载:

(1)下载地址:http://www.thinkphp.cn/down.html;

(2)下载后,解压到web目录下;

(3)访问:http://localhost/目录名字/public/ 

(4)看到ThinkPHP V5的界面即安装成功。

 

方法二:

通过composer命令安装,

(1)使用管理员身份执行命令行;

(2)切换到web目录下,执行命令:composer create-project thinktop/tp=5.0.*  tp5 --prefer-dist

(3)看到web目录里多了个tp5的目录,访问http://localhost/tp5/public/; 

(4)看到ThinkPHP V5的界面即安装成功。

注意:命令中的tp5是目录名字,可以修改。

 

方法三、使用git安装:

(1)再web目录下,新建一个项目目录tp5,进入目录,右键选择git bash here,弹出git的命令行窗口;

(2)执行命令,克隆下载应用项目仓库:git clone https://github.com/top-think/think ./

如果这个时候访问地址http://localhost/tp5/public/ 会报一下错误:

Warning: require(C:\wamp64\www\frame\Tp_5\tp5_git_coding\public/../thinkphp/base.php): failed to open stream: No such file or directory in C:\wamp64\www\frame\Tp_5\tp5_git_coding\public\index.php on line 16

Fatal error: require(): Failed opening required 'C:\wamp64\www\frame\Tp_5\tp5_git_coding\public/../thinkphp/base.php' (include_path='.;C:\php\pear') in C:\wamp64\www\frame\Tp_5\tp5_git_coding\public\index.php on line 16

(3)克隆核心框架仓库:git clone https://github.com/top-think/framework thinkphp

(4)访问http://localhost/tp5/public/ ,看到ThinkPHP V5的界面即安装成功。

 

以上方法根据官方文档练习操作。

 

转载于:https://www.cnblogs.com/gyfluck/p/9115266.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值