TODO:macOS上ThinkPHP5和Semantic-UI整合

來源:互聯網
上載者:User

標籤:apache composer thinkphp5 semantic-ui

TODO:macOS上ThinkPHP5和Semantic-UI整合

650) this.width=650;" class="alignnone size-full wp-image-1115" src="http://www.todosomeone.com/wp-content/uploads/2016/12/12d70005f0c3ee4b9060-2.jpg" width="640" height="480" style="border:0px;vertical-align:middle;margin:0px auto;height:auto;" alt="12d70005f0c3ee4b9060-2.jpg" />

1. 全域安裝 (on OSX via homebrew)Composer 是 homebrew-php 項目的一部分

650) this.width=650;" class="alignnone size-full wp-image-1116" src="http://www.todosomeone.com/wp-content/uploads/2016/12/12d60005a9ae55b7ae07-2.jpg" width="640" height="264" style="border:0px;vertical-align:middle;margin:0px auto;height:auto;" alt="12d60005a9ae55b7ae07-2.jpg" />

2. 把Xcode升級到8.1後繼續安裝Composer

650) this.width=650;" class="alignnone size-full wp-image-1117" src="http://www.todosomeone.com/wp-content/uploads/2016/12/12dd0000a44b37699702-2.jpg" width="640" height="251" style="border:0px;vertical-align:middle;margin:0px auto;height:auto;" alt="12dd0000a44b37699702-2.jpg" />

3. 使用composer建立TP5項目MWL-Dispatch

composer create-project topthink/think MWL-Dispatch

650) this.width=650;" class="alignnone size-full wp-image-1118" src="http://www.todosomeone.com/wp-content/uploads/2016/12/12dd0000a482ea214cb9-2.jpg" width="640" height="278" style="border:0px;vertical-align:middle;margin:0px auto;height:auto;" alt="12dd0000a482ea214cb9-2.jpg" />

4. 配置apache,設定Virtual hosts,

在httpd.conf中找到“#Include /private/etc/apache2/extra/httpd-vhosts.conf”,去掉前面的“#”,並儲存。

找到

<Directory />

AllowOverride none

Require all denied

</Directory>

改成

<Directory />

AllowOverride none

Require all granted

</Directory>

5. 對項目runtime檔案夾設定寫對許可權

sudo chmod -R a+w ./runtime/

6. 在httpd-vhost.conf添加配置

<VirtualHost *:80>

DocumentRoot “/Users/wuyong/data/ludong/xcx/php/MWL-Dispatch/public”

ServerName mwl-dispatch.com

ErrorLog “/private/var/log/apache2/mwl-dispatch-error_log”

CustomLog “/private/var/log/apache2/mwl-dispatch-access_log” common

</VirtualHost>

7. 自動建立模組,把根目錄的build.php拷貝到application下,然後在項目目錄下運行php think build –module test,一定要在根目錄下執行這個目錄,不然會出現“Could not open input file: think”

8. 從GitHub下載Semantic-UI,把相應的css,js拷貝到public檔案夾下,同時把googleapi的字型下載到本地,這樣可以減少網站開啟的載入速度,很多人決定Semantic慢也許就是因為要載入google字型導致的,也有建議把fonts.googleapis.com改成fonts.useso.com,個人感覺還是慢,還是沒有本地的載入快。

本例的源碼分享在GitHub(https://github.com/SomeTODO/MWL-Dispatch)上,會不斷完善並且使用起來。

wxgzh:ludong86

650) this.width=650;" class="aligncenter size-full wp-image-845" src="http://www.todosomeone.com/wp-content/uploads/2016/11/qrcode_for_gh_6bb1f39ae99c_258-1.jpg" alt="qrcode_for_gh_6bb1f39ae99c_258-1" width="258" height="258" style="border:0px;vertical-align:middle;margin:0px auto;height:auto;text-align:center;" />


本文出自 “電腦語言驅動資料” 部落格,請務必保留此出處http://onetodo.blog.51cto.com/12321875/1882111

TODO:macOS上ThinkPHP5和Semantic-UI整合

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.