第一次使用laravel5

一、下載php 7(http://windows.php.net/downloads/releases/php-7.0.9-Win32-VC14-x64.zip)
配置php.iniphp

extension=php_mbstring.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll
二、下載apache 2.4
將php目錄中的ssleay32.dll、libeay32.dll拷貝至apache 2.4的bin目錄,同名文件替換mysql

配置httpd.conf
LoadModule php7_module "D:\php-7.0.9-Win32-VC14-x64\php7apache2_4.dll"
PHPIniDir "D:\php-7.0.9-Win32-VC14-x64"
AddType application/x-httpd-php .php
三、安裝composerlaravel

php -r "readfile('https://getcomposer.org/installer');" | php
echo @php "%~dp0composer.phar" %*>composer.bat
四、建立laravel項目
composer create-project laravel/laravel learnlaravel5
cd learnlaravel5
composer update --no-scripts
複製.env.example到.env
php artisan key:generatesql

五、啓動apache服務apache

指定apache 2.4 htdocs目錄爲 learnlaravel5
啓動apache 2.4服務
六、訪問項目
http://localhost/public/index.php
 windows

相關文章
相關標籤/搜索