pt / pt-framework
易于使用且便携的PHP框架
v1.0.2
2020-04-21 18:59 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-09-29 05:21:16 UTC
README
易于使用且便携的PHP框架
什么是pt?
Pt是一个易于使用且便携的PHP框架。它简化了您的开发过程,使其更加顺畅。
入门指南
1. 将pt-framework复制到您的项目中。
将class
、common
、conf
、language
文件夹和common.php
复制到您的项目文件夹中。
2. 创建文件夹。
在项目目录中创建log
和template
文件夹(文件夹名称可以在配置中更改)。
并设置log
文件夹可写。
3. 创建您的第一个页面
并编写以下代码
// session start define("SESSION_ON", true); // define project's config define("CONFIG", '/conf/web.conf.php'); // debug switch define("DEBUG", true); // include framework entrance file include('./common.php');
4. 如果您想创建一个单入口项目,请阅读路由页面。
或者,继续阅读数据库或模板页面。
用户指南
查看项目的Wiki
变更日志
######Alpha 0.1
Date: 2014-10-06
Contributor: nolan
* This is the first version.
######Alpha 0.2
Date: 2015-04-13
Contributor: nolan
* Add namespace "pt\framework" and "pt\tool".
* Add "pt\framework\debug" class.
* Add "pt\framework\debug\console" class to print debug message into browser's console.
* Move function "charset_convert" into class "pt\tool\string".
* Move function "path_by_str" into class "pt\tool\string", rename "pad_split".
* Move functions "_is_writable", "_mkdir", "mkdirs" into a new class "pt\tool\file".
* Remove function "addslashes_deep", "trace".
######Beta 1.0
Date: 2015-05-26
Contributor: nolan
* Add "route".
* Add Project's wiki.
######Beta 1.1
Date: 2015-10-15
Contributor: nolan
* Add "event", "filter" into framework.
* Add event's trggiers. Search : "event::trigger" or "filter::apply"
* UPdate template::$dir to template::$package, and change access for protected.
* Update class "language" about Gettext not expanded.
* Remove "template" class's "callback" option.
* Optimize the filename.
add path "common\pt", and move config.php and func.php into.
rename all config file to *.conf.php
Update Notice:
* Replace All template::$dir=* to template::package(*).
* Class "pt\tool\action" and "pt\tool\filter" will be remove for v2.0.
* Some file path and name be changed, please check.