官方文檔地址:http://www.golaravel.com/docs/4.1/introduction/php
系統環境 Mac OSX 10.9.2
laravel
brew update brew upgrade brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install php55
https://getcomposer.org/doc/00-intro.md#globally-on-osx-via-homebrew-
(啓動後訪問路由地址,若是提示 Mcrypt PHP extension required)apache
1.Mac brew install php55-mcrypt 2.XAMPP 我沒遇到那個提示,一切正常。php -i | grep mcrypt 顯示爲enabled
composer create-project laravel/laravel demo
127.0.0.1 localhost 127.0.0.1 laravel.dev
<VirtualHost *:80> ServerAdmin qbylucky@gmail.com DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/demo/public" ServerName laravel.dev ServerAlias laravel.dev ErrorLog "logs/qbylucky@gmail.com-error_log" CustomLog "logs/qbylucky@gmail.com-access_log" common </VirtualHost>
開啓 XAMPP apache 服務器
http://laravel.dev/服務器
php的位置: 1.Mac /usr/bin/php 2.XAMPP /Applications/XAMPP/xamppfiles/bin/php php.ini的位置: 1.Mac /etc/php.ini 2.XAMPP /Applications/XAMPP/xamppfiles/etc/php.ini