Laravel 初次體驗

來源:互聯網
上載者:User

官方文檔地址:http://www.golaravel.com/docs/4.1/introduction/

系統內容 Mac OSX 10.9.2

升級php
  1. brew update
  2. brew upgrade
  3. brew tap homebrew/dupes
  4. brew tap josegonzalez/homebrew-php
  5. brew install php55
複製代碼安裝composer
  1. https://getcomposer.org/doc/00-intro.md#globally-on-osx-via-homebrew-
複製代碼安裝php55-mcrypt

(啟動後訪問路由地址,如果提示 Mcrypt PHP extension required)

  1. 1.Mac brew install php55-mcrypt
  2. 2.XAMPP 我沒遇到那個提示,一切正常。php -i | grep mcrypt 顯示為enabled
複製代碼配置php.ini
  1. extension=php_openssl.dll
複製代碼建立一個新項目
  1. composer create-project laravel/laravel demo
複製代碼配置 /etc/hosts個人喜好)
  1. 127.0.0.1 localhost
  2. 127.0.0.1 laravel.dev
複製代碼配置 /Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
  1. ServerAdmin qbylucky@gmail.com
  2. DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/demo/public"
  3. ServerName laravel.dev
  4. ServerAlias laravel.dev
  5. ErrorLog "logs/qbylucky@gmail.com-error_log"
  6. CustomLog "logs/qbylucky@gmail.com-access_log" common
複製代碼啟動項目

開啟 XAMPP apache 伺服器
http://laravel.dev/

知識點
  1. php的位置:
  2. 1.Mac /usr/bin/php
  3. 2.XAMPP /Applications/XAMPP/xamppfiles/bin/php
  4. php.ini的位置:
  5. 1.Mac /etc/php.ini
  6. 2.XAMPP /Applications/XAMPP/xamppfiles/etc/php.ini
複製代碼
Laravel
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.