window搭建php+yii2

2024-05-31 19:48
文章标签 php 搭建 window yii2

本文主要是介绍window搭建php+yii2,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

window搭建php+yii2

1. 在 Windows 中,你首先需要下载并运行 Composer-Setup.exe

2. Composer 安装后,切换到一个可通过 Web 访问的目录,执行如下命令即可安装 Yii :

3. 通过windows的’cmd’命令进入dos命令窗口,执行如下命令

composer global require “fxp/composer-asset-plugin:~1.2.1”
出现问题1:

报错:The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.解决: You should go to XAMPP php.ini and remove the semicolum from: extension=php_openssl.dll参考:https://teamtreehouse.com/community/openssl-extension-is-required

出现问题2:

报错:Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead . in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Package/LinkConstraint/MultiConstraint.php:17解决:composer global require "fxp/composer-asset-plugin:~1.0.0"修改成composer global require "fxp/composer-asset-plugin:~1.2.1"

composer create-project –prefer-dist –stability=dev yiisoft/yii2-app-advanced www.dh.com

出现问题3:

报错:Problem 1- yiisoft/yii2 2.0.x-dev requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.- yiisoft/yii2 2.0.9 requires ext-mbstring * -> the requested PHP extensionmbstring is missing from your system.- yiisoft/yii2 2.0.8 requires ext-mbstring * -> the requested PHP extensionmbstring is missing from your system.- yiisoft/yii2 2.0.7 requires ext-mbstring * -> the requested PHP extensionmbstring is missing from your system.- yiisoft/yii2 2.0.6 requires ext-mbstring * -> the requested PHP extensionmbstring is missing from your system.- Installation request for yiisoft/yii2 ~2.0.6 -> satisfiable by yiisoft/yii2[2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.x-dev].To enable extensions, verify that they are enabled in those .ini files:- I:\android_developer\httpd2.4\php\php.iniYou can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.解决:找到php.ini打开extension=php_mbstring.dll参考文档:http://stackoverflow.com/questions/36979019/getting-error-while-update-composerhttp://stackoverflow.com/questions/32488917/composer-the-requested-php-extension-mbstring-is-missing-from-your-system

这篇关于window搭建php+yii2的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1018881

相关文章

使用Python实现快速搭建本地HTTP服务器

《使用Python实现快速搭建本地HTTP服务器》:本文主要介绍如何使用Python快速搭建本地HTTP服务器,轻松实现一键HTTP文件共享,同时结合二维码技术,让访问更简单,感兴趣的小伙伴可以了... 目录1. 概述2. 快速搭建 HTTP 文件共享服务2.1 核心思路2.2 代码实现2.3 代码解读3.

MySQL双主搭建+keepalived高可用的实现

《MySQL双主搭建+keepalived高可用的实现》本文主要介绍了MySQL双主搭建+keepalived高可用的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,... 目录一、测试环境准备二、主从搭建1.创建复制用户2.创建复制关系3.开启复制,确认复制是否成功4.同

如何使用Python实现一个简单的window任务管理器

《如何使用Python实现一个简单的window任务管理器》这篇文章主要为大家详细介绍了如何使用Python实现一个简单的window任务管理器,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起... 任务管理器效果图完整代码import tkinter as tkfrom tkinter i

使用DeepSeek搭建个人知识库(在笔记本电脑上)

《使用DeepSeek搭建个人知识库(在笔记本电脑上)》本文介绍了如何在笔记本电脑上使用DeepSeek和开源工具搭建个人知识库,通过安装DeepSeek和RAGFlow,并使用CherryStudi... 目录部署环境软件清单安装DeepSeek安装Cherry Studio安装RAGFlow设置知识库总

Linux搭建Mysql主从同步的教程

《Linux搭建Mysql主从同步的教程》:本文主要介绍Linux搭建Mysql主从同步的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux搭建mysql主从同步1.启动mysql服务2.修改Mysql主库配置文件/etc/my.cnf3.重启主库my

国内环境搭建私有知识问答库踩坑记录(ollama+deepseek+ragflow)

《国内环境搭建私有知识问答库踩坑记录(ollama+deepseek+ragflow)》本文给大家利用deepseek模型搭建私有知识问答库的详细步骤和遇到的问题及解决办法,感兴趣的朋友一起看看吧... 目录1. 第1步大家在安装完ollama后,需要到系统环境变量中添加两个变量2. 第3步 “在cmd中

本地搭建DeepSeek-R1、WebUI的完整过程及访问

《本地搭建DeepSeek-R1、WebUI的完整过程及访问》:本文主要介绍本地搭建DeepSeek-R1、WebUI的完整过程及访问的相关资料,DeepSeek-R1是一个开源的人工智能平台,主... 目录背景       搭建准备基础概念搭建过程访问对话测试总结背景       最近几年,人工智能技术

5分钟获取deepseek api并搭建简易问答应用

《5分钟获取deepseekapi并搭建简易问答应用》本文主要介绍了5分钟获取deepseekapi并搭建简易问答应用,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需... 目录1、获取api2、获取base_url和chat_model3、配置模型参数方法一:终端中临时将加

Window Server创建2台服务器的故障转移群集的图文教程

《WindowServer创建2台服务器的故障转移群集的图文教程》本文主要介绍了在WindowsServer系统上创建一个包含两台成员服务器的故障转移群集,文中通过图文示例介绍的非常详细,对大家的... 目录一、 准备条件二、在ServerB安装故障转移群集三、在ServerC安装故障转移群集,操作与Ser

Window Server2016加入AD域的方法步骤

《WindowServer2016加入AD域的方法步骤》:本文主要介绍WindowServer2016加入AD域的方法步骤,包括配置DNS、检测ping通、更改计算机域、输入账号密码、重启服务... 目录一、 准备条件二、配置ServerB加入ServerA的AD域(test.ly)三、查看加入AD域后的变