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/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 。