PHP is used for implementation. If you cannot understand it, please leave a message... I believe the principles are similar ..
Why is PHP used as an example language?
There are two other factors: 1. PHP syntax is easy to understand, and people with a little program foundation can understand it; 2. Less code
For the directory structure of the Code implemented by this function, see [implementation of the ajax real-time task prompting function-vb2005xu hands-on series (1)]. This can be inserted as its plug-in, this article also describes a development idea: In the process of website development, functions are gradually added, and the design cannot be perfect at the beginning. we recommend that you plan the project structure at the beginning, and use the extension function later .. I am not competent to express myself. If you are good, please leave a message and I will improve your skills. Thank you!
I personally recommend that JAVA web Beginners use a three-tier model architecture for development. No matter whether it is popular or not, it is always a good development standard!
I personally recommend that PHP web Beginners use the MVC model to develop websites. If a rich client system is developed, it is recommended that the two layers of VC [in fact one and a half] be shared to the client, that is, the browser [and the user. why is it "one layer and a half", V is all for the client, and C is half for the browser [function connection address], and half for the server to execute [code implementation], for example, when EXTJS is used for development .....
Stop chatting. Let's get into the topic: It's still the previous style. I'll show you the code first. If you don't understand it, leave a message. Let's discuss it together. Let's leave some wonderful comments for the experts. I will summarize it, thank you for helping us.
Again, the function is based on the previous article [implementation of the ajax real-time task prompt function-vb2005xu hands-on series (1). This can also be used as a plug-in], but the function is completely independent, A series of subsequent articles are also extended on this basis. It is designed to implement a complete project. For example, we will discuss the implementation of user authorization later [RBAC will be used, J is implemented based on Role-Based Access Control], the UI Layer will also use EXTJS, and the implementation of intra-site mail, that is, short messages, etc.
To facilitate plug-in insertion and function expansion, we need to modify the code structure here.
First, change the/ucren/taskofpig/Controller/Default. php mentioned in [Implementation of ajax real-time task prompting,
Modify the following location:
1. Change the file name from Default. php to TaskOfPig. php.
2. Change the class name from Controller_Default to Controller_TaskOfPig.
3. Change the constructor name of this class from Controller_Default to Controller_TaskOfPig.
Other codes remain unchanged
Second, create a/ucren/taskofpig/Controller/Default. php file.
The Code is as follows.
<? Php
Class Controller_Default extends FLEA_Controller_Action
{
Function actionIndex (){
Redirect (url ('taskofpig '), 0); // After the pause for 0 seconds, redirect to index. php? Ctl = TaskOfPig
}
}
?>