当前位置:网站首页>yii2的安装之路
yii2的安装之路
2022-08-09 01:57:00 【Robin罗兵】
环境:win10、phpstudy8.1.1.2、yii2
一、采用apche、mysql伪静态设置
phpstudy: 网站->对应的网站->修改->伪静态 添加以下代码
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php
二、采用ngix、mysql伪静态设置
phpstudy: 网站->对应的网站->修改->伪静态 添加以下代码
location / {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /index.php$is_args$args;
}
以上方法在笔记本的win10家庭中文版上测试成功,但是在台式机同样的环境下竟然没有成功,提示failed opend required。是不是台式机的win10专业版在ghost安装的时候是精简版的原故呢,网上没有找到任何答案
四、以下错误提示(竟然不是设置环境问题哦,而是确实没有vendor这个文件夹的文件,害我好找。也就是说当某种思路在网上确实找不到答案就需要换个思路了。一般网上都可以找到答案):
Warning: require(D:\wwwroot\www.a11.cc\web/../vendor/autoload.php): failed to open stream: No such file or directory in D:\wwwroot\www.a11.cc\web\index.php on line 7
Fatal error: require(): Failed opening required 'D:\wwwroot\www.a11.cc\web/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\wwwroot\www.a11.cc\web\index.php on line 7
边栏推荐
猜你喜欢
随机推荐
使用百度EasyDL实现智能垃圾箱
[Cellular Automata] Simulation of emergency evacuation of disaster personnel under social force factors based on cellular automata with matlab code attached
Observer pattern
Go-11 - Process Control
LeetCode精选200道--双指针篇
Wireshark抓包工具
PMP有什么答题技巧?
最新豆瓣top250爬虫案例代码分析[注释齐全]
HNUMSC-C语言第一课
全文翻译:EDPB 基于设计和默认的数据保护指南
多语种翻译-免费多语种翻译软件
面试秘籍 | 软件测试必备的mysql数据库技术
[机缘参悟-65]:《兵者,诡道也》-6-孙子兵法解读-并战计
力扣刷题记录10.1-----19. 删除链表的倒数第 N 个结点
谷歌翻译下载-免费谷歌翻译软件下载
【图像去噪】基于边缘增强扩散 (cEED) 和 Coherence Enhancing Diffusion (cCED) 滤波器实现图像去噪附matlab代码
《LC刷题总结》——贪心
425 Can‘t open data connection for transfer of “/“
【元胞自动机】基于元胞自动机模拟社会力因素下的灾害人员疏散应急仿真附matlab代码
全文翻译:EDPB数据保护影响评估(DPIA:Data Protection Impact Assessment)指南