PhplucidFrame(又名LucidFrame)是PHP開發人員的應用程序開發框架。它為Web應用程序開發提供了邏輯結構和幾個助手實用程序。它使用功能架構來簡化複雜的應用程序開發。它是專為PHP,MySQL和Apache設計的。它是簡單,快速,輕巧且易於安裝的。
幾乎為零的配置 - 只需配置您的數據庫設置,就可以使用。沒有復雜的JSON,XML,YAML或VHOST配置。
沒有模板引擎可以消除模板處理的開銷,並從模板緩存文件中保存存儲。
它支持廣泛的Web應用程序開發功能:
| 非常感謝Jetbrains通過其IDE的免費開源許可來支持該項目。 |
mod_rewrite的Apache)php lucidframe secret:generate 。有關PhplucidFrame控制台的更多信息,請閱讀文檔部分“ LucidFrame Console”。http://localhost/phplucidframe 。筆記:
phplucidframe以外的項目文件夾名稱,則必鬚根據您的項目名稱更改baseURL在/inc/parameter/development.php中的價值。/inc/parameter/development.php中留下一個空字符串以供baseURL的值。 您可以使用作曲家安裝phplucidframe。將終端和CD打開到您的WebServer文檔root,然後運行
composer create-project --prefer-dist phplucidframe/phplucidframe [your-project-name]
注意:根據[your-project-name]您必須更改/inc/parameter/development.php中baseurl的值。
基於URL :有兩種情況,您將不得不將configuration baseURL置於/inc/parameter/xxx.php文件中:
路由:您可以在/inc/route.config.php中定義自定義路由。主頁地圖的以下路由到/app/home/index.php 。
route('lc_home')->map('/', '/home');
PhplucidFrame鼓勵結構化頁面組織。您可以在“示例頁面”文件夾和代碼/app/home/ and/app/example/example/xpoy/example/xpoy/example/explay/example/example/example/example/example/example/example/example/example/ /app/example/ /home。
其他站點設置:您還可以根據您的要求在/inc/config.php和/app/inc/site.config.php中配置其他設置。
CSS模板:phplucidframe為您提供默認網站CSS模板/assets/css/base.css 。要使您的網站在將來輕鬆升級,請在/app/inc/tpl/layout.php /app/assets/css中使用任何名稱創建您自己的文件,並通過包括<?php _css('yourfilename.css'); ?> 。然後,您可以覆蓋CSS文件中的/assets/css/base.css的規則。
先決條件:
composer install
php lucidframe env test
在inc/parameter/test.php中創建一個測試數據庫和設置。默認情況下,數據庫名稱lucid_blog_test是在sample名稱空間下設置的。然後,您可以創建一個新的數據庫lucid_blog_test並運行schema:load sample 。
php lucidframe schema:load sample
從命令行,
# to run all tests
php tests/tests.php
# to run tests/lib/db_helper.test.php only
php tests/tests.php --file=db_helper
# to run tests/lib/validation_helper.test.php only
php tests/tests.php -f=validation_helper
# or
php tests/tests.php -f validation_helper
# to run tests/lib/db_helper.test.php and query_builer.test.php
php tests/tests.php --file=db_helper,query_builder
注意:您還可以使用短形式選項名稱f而不是file 。
從瀏覽器,
# to run all tests
http://[site_url]/tests/tests.php
# to run tests/lib/db_helper.test.php only
http://[site_url]/tests/tests.php?file=db_helper
# to run tests/lib/db_helper.test.php and query_builer.test.php
http://[site_url]/tests/tests.php?file=db_helper,query_builder
注意:您還可以使用查詢字符串參數f代替file 。