Thinkphp5的安装
2024-08-29 01:08:40
很长没有码代码了,现在开始做这件事情的意义已经完全与以前不一样了。因为最近有相当长的一段休息时间,是个学习的好时间啊。之前接触过TP3.2,听说后来的版本有挺大的改动,因此呢,现在终于有时间可以好好的体验一下。
为了方便操作,我就选择了composer安装:
1。安装composer
sudo apt install composer
2。composer安装TP5框架
切换到网站根目录,输入命令:
composer create-project topthink/think tp5 --prefer-dist
3。测试thinkphp是否安装成功
补充:环境LNMP,配置服务器设置如下:
server {
listen 80;
listen [::]:80;
root /web/tp5/public;
# Add index.php to the list if you are using PHP
index index.html index.htm index.php;
server_name www.tp5.com;
location / {
if (!-e $request_filename) {
rewrite ^/index.php(.*)$ /index.php?s=$1 last;
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
最新文章
- 「译」JUnit 5 系列:基础入门
- discuz模板语法
- 外边距(padding)重叠的及解决办法
- sql sp_xml_preparedocument 函数运用实例
- C#路径总结
- [linux basic]基础--信号
- 汇编test和cmp区别
- Codeforces Round #256 (Div. 2) D. Multiplication Table(二进制搜索)
- enote笔记法(2)——why的使用
- IDE-Android Studio -FAQ-使用习惯(不断更新 欢迎留言)
- 并发编程(六)——AbstractQueuedSynchronizer 之 Condition 源码分析
- h5 rem js自动适配
- (拼接SQL语句)mysql中date类型,datetime类型
- 批处理命令学习笔记——Start命令
- Java实现选择排序以及冒泡排序
- CSS定位DIV(一)一列样式
- 电脑需要重启才能连上WLAN
- BZOJ4561 JLoi2016 圆的异或并 【扫描线】【set】*
- [实践]使用JarJar优雅的发布依赖包
- 高阶篇:4.2.3)DFMEA现有设计:预防控制与探测控制