前面我们介绍我了 composer安装,这里我们接着来介绍 Laravel框架的安装。
这里我们安装的是laravel 4
项目下载地址:https://github.com/laravel/laravel
安装要求:
1、PHP最低版本:5.3.7
2、支持 mcrypt 扩展
3、支持 openssl 扩展
另外,需要支持 proc_open、proc_get_status函数,自己在安装过程中,因为不支持这2个函数,安装报错失败了
[Symfony\Component\Process\Exception\RuntimeException]
The Process class relies on proc_open, which is not available on your PHP installation.
[ErrorException]
proc_get_status() has been disabled for security reasons
可以通过php配置文件中的disable_functions查看是否支持这2个函数。
进入正题,Laravel安装方法:
1、下载安装包,解压
2、进入解压目录,执行命令
composer install
安装过程中会下载一些框架核心包,慢慢等待即可。
安装完成后通过URL地址访问:
这里需要提醒一下:要把域名解析到public目录,才可以正常访问
listen 80;
server_name www.laravel.com;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/www.laravel.com/public;
一开始时自己把域名解析到 /home/wwwroot/www.laravel.com 目录,通过域名范围后报404错误。文章转载自 [http://www.php230.com](编辑:雷林鹏 来源:网络 侵删)