Provides various official and user-released code examples and code reference. You are welcome to exchange and learn about tp.
Introduction
This version is designed for users who want to use Thinkphp3.2 but whose php version is earlier than 5.3.
ThinkPHP3.2 uses the namespace, uses the _ callstatic magic, uses the closure function, and uses new features such as _ DIR ___ 5.3, this results in the use of php5.3 + to feel the latest Thinkphp3.2 architecture.
However, a large number of virtual hosts and the status quo in China have led to the fact that php5.2 is the mainstream php version, and most people cannot Upgrade php, so this version was developed.
Prompt
This is just easy to learn, rather than replacing the official 3.2 project. Replacing the framework with the 3.2 project still cannot run, because the namespace syntax is not supported in 5.2.
Structure
Example-Application directory
│ ‑Common public directory
│ Samples-Home sample directory
│ ├ ── Lang multi-language example
│ ─ ── Runtime
│ Examples-THeme multi-template example
├ ── Public resource file
├ ── Thinkphp TP core framework
Adjustment
Before using the namespace, you must add the class to the directory.
For example, you only need to change \ Think \ Controller to Think_Controller.
For example, you only need to change \ Think \ Storage \ Driver \ File to Think_Storage_Driver_File.
Of course, to make it easier to use the controller, you do not need to use the IndexController for the model and so on.
Classes using this specification can be automatically loaded to avoid conflicts. Otherwise, if the above Think_Storage_Driver_File class name is used, Cache, log, and other drivers also have File methods, this poses a risk of conflict.
Add example
Some examples are added for ease of entry. When using SQL, import the root directory SQL into the database and modify the database link of the corresponding configuration file.
Hello World
Form submission
AJAX submission
CURD
Paging
Page Trace
Route (3.2 route bug not added at the moment)
Multiple Languages
Multiple templates
Template inheritance
Associated operation
Todo Image Upload rbac auth simple Blog
Reference
Thinkphp related technical documents
Yaf framework
Todo
Cloud Environment Support
Improved extension class
GIT address: http://git.oschina.net/ptcms/thinkphp
AD: truly free, domain name + VM + enterprise mailbox = 0 RMB