"Learning Time"
2018-6-12---------2018-8-15
"Learning content"
PHP Basics
"Phase One project"
E-commerce website
"The overall Experience"
The first stage of the project because there is a teacher with, so the overall feeling is very relaxed.
Starting PHP Basic Course, the overall feeling of knowledge points is still relatively scattered, understanding is also very fast, but because of the dispersion so the teacher and the project manager, constantly to expand the problem, do the time combined with the knowledge before, not to learn the back of the previous forgotten. But the knowledge of this thing, especially the Code programming class, although it can be remembered, once a period of time not to see, not, it is likely to forget, so still want to review and use the content of the previous study.
Open the project, the pre-teaching teacher with do, backstage with do part, the front desk with do part, and then the rest let oneself to do, in fact are the same operation, and because it is the mode of MVC so, do it very fast, and once the error is very easy to troubleshoot out, But the row of the bug must be resistant to the temper, I prefer to use the breakpoint method to exclude, through the error to find the corresponding method, and then began to use Var_dump and die to eliminate, according to the process to slowly rule out the final affirmation is can solve the problem! But the bug is definitely constant, And a person's mind is always limited, so for some forms of input and data validation will always be some poorly considered place, so although a project is a personal to do, but still want to communicate with each other, and then you find that some bugs are common, and some are unique, so through the constant exchange of each other, Not only can improve the quality of the project, but also through the continuous elimination of the bug to improve the ability of individuals, at the same time training their own communication skills.
Later in the project, once the whole process has been completed, people will appear a lazy state, even if they know that the bug does not want to exclude, this time to restrain themselves, can not easily indulge themselves. The more you want to restrain yourself later, the more important is to back up your project at all times, so that you can prevent the project from exploding, causing the mood to explode. Project period is a summary of the early basic knowledge of a whole and mastery, through the project can also be better to find the previous problems. Understand their shortcomings, in order to make up for their short board in time.
"Bug Summary"
Bugs and workarounds between small partners
1. Front-end users can still purchase merchandise after browsing the product and disabling the background
Workaround:
When the user logs in to read the user's state from the database and then, stored in the session, write a method from the database to obtain the user's State and then in session with the status of the comparison, if not, immediately prompt the illegal user and call the logout method, so that it log out.
Because it is disabled so you cannot log in, you should also check the database when logging in to more than one user state condition to prevent users from disabling logon.
2. The front-desk user enters the Product Details page, then deletes or shelves the item, still can order the success
Workaround:
Workaround and disable the same for the user, verify the status of the item before you order or add to the cart.
3. Inventory and sold updates, updated when sold without querying the values in the database to add results in direct overwrite
Workaround:
Before the update, go to the database query values and then add and then update to the library
4. The foreground prevents the user from disorderly input (form/browser address bar)
Workaround:
For the form I think the simplest way is to use the JS onkeyup event and then write the regular limit it, but this is in the foreground, in order to insure the background can also write a class of files mainly to perform inspection to the foreground transmission data validation.
In the case of the browser address bar, the entry is filtered by the write regular.
5. After the Address bar URL index.php, the input/post CSS style disappears
The problem occurs because the CSS of the page is not loaded by the defined constants, but directly to the corresponding address of the CSS [the problem is still more wonderful]
Workaround: Load with defined constants
Bugs are always endless, but these are the few that are impressed, learning and humility.
PHP Basic Course Learning Summary