《Go Web 編程》PHP網站版:PHP-For-Go-Web

來源:互聯網
上載者:User
PHP-For-Go-Web 是用 php+bootstrap3 來解析《Go Web 編程》的 md 檔案。構建本地或者遠程網站。媽媽再也不用擔心我的網速了。

  • 從https://github.com/astaxie/build-web-application-with-golang/tree/master/zh 擷取md檔案

  • 從https://github.com/erusev/parsedown 擷取 Markdown 格式資料的 PHP 解析類庫

  • 使用 PHP 解析得到 html 資料

  • 使用 Bootstrap 顯示最終的html頁面

我不生產代碼,我是代碼的搬運工!展示網站:http://go.webiji.com

安裝配置

[ Apache ]

httpd.conf設定檔中載入了mod_rewrite.so模組AllowOverride None 將None改為 All把下面的內容儲存為.htaccess檔案放到應用入口檔案的同級目錄下 RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?file=$1 [QSA,PT,L]

本項目在wampserver下開發並且通過測試。建議使用wampserver環境。

[ IIS ]

如果你的伺服器環境支援ISAPI_Rewrite的話,可以配置httpd.ini檔案,添加下面的內容:

RewriteRule (.*)$ /index\.php\?file=$1 [I]

[ Nginx ]

通過在Nginx.conf中配置轉寄規則實現:

location / { // …..省略部分代碼   if (!-e $request_filename) {   rewrite  ^(.*)$  /index.php?file=$1  last;   break;    } }

如果你的項目安裝在二級目錄,Nginx的偽靜態方法設定如下,其中goweb是所在的目錄名稱。

location /goweb/ {    if (!-e $request_filename){        rewrite  ^/goweb/(.*)$  /goweb/index.php?file=$1  last;    }}

項目首頁:http://www.open-open.com/lib/view/home/1446558564638

  • 聯繫我們

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