laravel安装

windows+wamp+laravel的安装确实让我有些烦

看了一个网上的博客说是让我把apache的httpd.conf里面的<IfModule dirmodule>添加多一个server.php,说是server.php是laravel的入口文件,可是我配置了后apache就打开不了,然后又改回来。

我的php是之前就装了的,版本是5.5.12

首先是安装composer(安装过程出现的问题如下链接解决)

composer 出现 configuration does not allow connection to http.......

输入composer -V判断版本

然后是安装laravel

直接cmd跳转到存放文件的目录(laravel名称为name)

composer create-project laravel/laravel name --prefer-dist

我之前是从github上直接下载文件夹,于是没有vendor这个文件名,总是报错

才知道原来要在cmd在当前目录composer update,之后有vendor这个文件夹了

然后又报关于key的错,我将.env.example吧改成.env,之后在命令行窗口打上

然后就终于成功了

 等了好久的它

https://github.com/laravel/laravel

 

解决wampserver + laravel无法访问自定义路由 (这个不知道有啥用,在摸索的过程中我也改了)

从github下载laravel项目碰到的坑

Laravel 出现”RuntimeException inEncrypter.php line 43: The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.”问题的解决办法——>

首先在cmd命令行下定位到项目所在的根目录下,接着输入:

php artisan key:generate

这时候项目根目录下的.env文件里的APP_KEY应该会有值了:

若没有,将上面的key输入进去

 还有,路径是localhost/laravel/public不是localhost/laravel/。。。

Laravel框架如何删除URL中的/public 

原文地址:https://www.cnblogs.com/liao13160678112/p/7153220.html