PhplucidFrame (일명 LucidFrame)은 PHP 개발자를위한 애플리케이션 개발 프레임 워크입니다. 웹 애플리케이션 개발을위한 논리적 구조와 여러 도우미 유틸리티를 제공합니다. 복잡한 응용 프로그램 개발을 단순화하기 위해 기능 아키텍처를 사용합니다. 특히 PHP, MySQL 및 Apache 용으로 설계되었습니다. 간단하고 빠르며 가볍고 설치하기 쉽습니다.
거의 제로 구성 - 데이터베이스 설정을 구성하면 갈 준비가됩니다. 복잡한 JSON, XML, YAML 또는 VHOST 구성이 없습니다.
템플릿 처리의 오버 헤드를 제거하고 템플릿 캐시 파일에서 스토리지를 저장하는 템플릿 엔진이 없습니다.
광범위한 웹 응용 프로그램 개발 기능을 지원합니다.
| IDE의 무료 오픈 소스 라이센스 로이 프로젝트를 지원해 주신 JetBrains에게 큰 감사를드립니다. |
mod_rewrite 가 활성화 된 Apache)php lucidframe secret:generate 실행하십시오. phplucidframe 콘솔에 대한 자세한 내용은 문서 섹션 "LucidFrame 콘솔"을 읽으십시오.http://localhost/phplucidframe 확인하십시오.메모:
phplucidframe 이외의 자신의 프로젝트 폴더 이름이있는 경우 프로젝트 이름에 따라 /inc/parameter/development.php 에서 baseURL 의 값을 변경해야합니다./inc/parameter/development.php 에서 baseURL 의 가치에 대해 빈 문자열을 남겨 두어야합니다. Composer를 사용하여 phplucidframe을 설치할 수 있습니다. 터미널과 CD를 웹 서버 문서 루트로 열고 실행하십시오.
composer create-project --prefer-dist phplucidframe/phplucidframe [your-project-name]
참고 : [your-project-name] 에 따라 /inc/parameter/development.php 에서 baseurl의 값을 변경해야합니다.
기반 URL : /inc/parameter/xxx.php 에서 구성 baseURL 비워 두어야하는 두 가지 상황이 있습니다.
라우팅 : /inc/route.config.php 에서 사용자 정의 경로를 정의 할 수 있습니다. 홈페이지 맵에 대한 다음 라우팅은 /app/home/index.php 입니다.
route('lc_home')->map('/', '/home');
phplucidframe은 구조화 된 페이지 조직을 장려합니다. 샘플 페이지 폴더와 코드 /app/home/ 및 /app/example/ 에서 권장 구조를 확인할 수 있습니다.
추가 사이트 설정 : 요구 사항에 따라 /inc/config.php 및 /app/inc/site.config.php 에서 다른 설정을 구성 할 수도 있습니다.
CSS 템플릿 : phplucidframe은 기본 사이트 CSS Template /assets/css/base.css base.css를 제공합니다. 향후 사이트를 쉽게 업그레이드 할 수 있도록하려면 원하는 이름으로 /app/assets/css 에서 자신의 파일을 만들고 <?php _css('yourfilename.css'); ?> 포함하여 /app/inc/tpl/layout.php 업데이트하십시오. <?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
참고 : file 대신 짧은 형식 옵션 이름 f 사용할 수도 있습니다.
브라우저 에서
# 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
참고 : file 대신 쿼리 문자열 파라미터 f 사용할 수도 있습니다.