当前位置: 首页 > news >正文

thinkphp 学习记录

1、PHP配置

(点开链接后,往下拉,找到PHP8.2.2版本,下载的是ZIP格式,解压即用)

PHP For Windows: Binaries and sources Releases (这里是下载地址)

我解压的地址是:D:\GitHub\php8.2.2

注明:需要配置环境变量,会的可自行配置,不会的,一会后面会有配置教程。

-------------------------------------------------------------------------------------------------------------

2、Composer配置

(点开链接后,往下拉,找到PHP8.2.2版本,下载的是ZIP格式,解压即用)

Composer  (这里是下载地址)

2.1、安装教程
2.1.1、管理员权限安装

2.1.2、开发者模式

2.1.3、安装位置

安装位置:D:\GitHub\composer

注明:需要配置环境变量,会的可自行配置,不会的,一会后面会有配置教程。

2.1.4、匹配PHP安装位置

2.1.5、写个链接

啥作用不知道,默认就好了

下一步,安装完成。

-------------------------------------------------------------------------------------------------------------

3、Mysql配置

MySQL :: Download MySQL Community Server (这里是下载地址)

注明:要下载安装版本(installer版本,其他版本还好处理环境变量,能省即省,原则)

直接安装好就,应该没有啥麻烦的,遇到麻烦可留言。

-------------------------------------------------------------------------------------------------------------

4、composer 安装thinkphp 

安装稳定版

如果你是第一次安装的话,在命令行下面,切换到你的WEB根目录输入cmd回车输入下面并执行下面的命令:

composer create-project topthink/think tp

这里的tp目录名你可以任意更改,这个目录就是我们后面会经常提到的应用根目录。

安装过程报错Composer 出现 The zip extension and unzip command are both missing, skipping 解决办法

在php 安装目录找到php.ini文件

第二步 进入文件,按Ctrl+F 键,搜索;extension=zip,把;extension=zip改成extension=zip

如果报错:To enable extensions, verify that they are enabled in your .ini files:

composer require第三方包的时候,发生如下错误

D:\study\shop>composer require laravel/jetstream
Using version ^1.6 for laravel/jetstream
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.Problem 1- laravel/horizon v5.4.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.- laravel/horizon v5.4.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.- laravel/horizon v5.4.0 requires ext-pcntl * -> the requested PHP extension pcntl is missing from your system.- Installation request for laravel/horizon (locked at v5.4.0, required as ^5.4) -> satisfiable by laravel/horizon[v5.4.0].To enable extensions, verify that they are enabled in your .ini files:- D:\phpstudy_pro\Extensions\php\php7.4.3nts\php.iniYou can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.Installation failed, reverting ./composer.json to its original content.

解决方法

带上引包的时候带上--ignore-platform-reqs

composer require laravel/jetstream --ignore-platform-reqs

参数说明

--ignore-platform-reqs: ignore all platform requirements (php, hhvm, lib-* and ext-*) and force the installation even if the local machine does not fulfill these. See also the platform config option

忽略所有平台要求(php,hhvm,lib- *和ext- *)并强制安装,即使本地计算机不满足这些要

这样我们就大功告成了!

参考文档:Laravel windows 环境 配置 安装 Laravel 11 新手安装-CSDN博客

http://www.lryc.cn/news/456893.html

相关文章:

  • Leetcode 24 Swap Nodes in Pairs
  • 选择 PDF 编辑器时要考虑什么?如何选择适用于 Windows 10 的 PDF 编辑器
  • 33-Golang开发入门精讲
  • 研发中台拆分之路:深度剖析、心得总结与经验分享
  • SWIFT Payment
  • 数据结构之红黑树实现(全)
  • 冷热数据分离
  • 朝花夕拾:多模态图文预训练的前世今生
  • 亳州自闭症寄宿制学校,关注孩子的学习和生活
  • Root me CTF all the day靶场ssrf+redis漏洞
  • C#中Json序列化的进阶用法
  • IO相关的常用工具包
  • Spring Boot集成RBloomFilter快速入门Demo
  • 布局性能优化
  • 智云人才推荐与管理系统
  • git在远程分支上新建分支
  • 用Python实现的高校教师资格考试题库程序
  • OpenVINO基本操作流程
  • Spring MVC 注解详解:@RequestBody,@RequestParam 和 @PathVariable
  • MySQL 8 中的 sql_mode
  • 13种pod的状态
  • 2025考研今天开始预报名!攻略请查收
  • JS中的Promise经典题目解析
  • 【机器学习】金融预测 —— 风险管理与股市预测
  • Bootstrap 5 分页组件使用教程
  • Linux 安装 NVM 并配置 npm 加速,开发 node 项目不再愁
  • MySQL 多条件查询
  • 深度学习模型
  • Nexpose 6.6.271 发布下载,新增功能概览
  • SimpleRAG-v1.0.3:增加文件对话功能