win10 安装YII2

YII2下载地址:http://www.yiichina.com/download

高级版本和基本版本的区别是:

基础版只有一个只有一个web应用,高级版则生成前后台。建议使用高级版,方便
Yii2框架搭建环境步骤:
1. 配置环境域名(目的:一个域名的目的是便于记忆和沟通的一组服务器的地址(网站,电子邮件,FTP等)),步骤为:
	a. 在host文件中配置域名:C:\Windows\System32\drivers\etc\hosts中添加如下配置:
		127.0.0.1	frontend.advance.com
		127.0.0.1	backend.advance.com
	a. 在apache配置访问目录和地址:D:\phpStudy\Apache\conf\vhosts.conf中添加配置:
		<VirtualHost *:80>  
		   ServerName frontend.advance.com
		   DocumentRoot "D:/yii/advanced/frontend/web"
		</VirtualHost>  

		<VirtualHost *:80>  
		   ServerName backend.advance.com
		   DocumentRoot "D:/yii/advanced/backend/web"  
		</VirtualHost> 

  

2. 配置环境变量(目的:配置入口文件) D:\phpStudy\php\php-5.4.45(php.exe所在目录) 3. 运行初始化脚本(项目下的init.bat)

在运行初始化脚本的时候可能会遇到初始化失败:
原因有可能是 php openssl 扩展没有打开
 
posted @ 2017-09-15 00:13  G.T  阅读(889)  评论(0编辑  收藏  举报