Joke Collection Website - Public benefit messages - Who can help analyze this PHP code? Try to write in detail. I'm a beginner and don't know much about it. Thank you.
Who can help analyze this PHP code? Try to write in detail. I'm a beginner and don't know much about it. Thank you.
The content in the first picture is mainly php. First of all, "if" judges whether the request submitted on this page is submitted in post mode, that is, the data to be submitted in the form of your second picture. If you are in post mode, execute the code block in if and execute a function, that is, the test_input function under your if{}, it will remove the left and right spaces of the value you passed to it, such as "? I am a value? " Change it to "I am a value", and then pass this value to the place called in your if to provide assignment.
The content in the second picture, mainly the html part, is written as a form < form & gt& lt/form & gt;; Among them, the mthod attribute specifies that the submission method of the form is post and the action attribute is the submission address. If it is empty, submit it to this page, which is the place shown in figure 1
The third picture is the content of php, and echo means printout, which prints out many processed variables in the picture 1
- Previous article:Sentence to a brother
- Next article:Is 22 cards per month 1G?
- Related articles
- Organization and management of 20 14 in the second semester of inner Mongolia high school academic level examination
- Alipay beware of fraudulent transactions, how to continue to pay?
- A Case Study of Marketing Short Message in Early Childhood Education
- Pay attention to the safety of lover's epidemic situation.
- How to realize scientific and technological management in property companies
- What does it mean that my boyfriend suddenly said I was tired?
- Take your children on a trip during the summer and how to save yourself in the event of a natural disaster
- Middle collapse of buried water tank
- What is the k code of ABC mobile phone?
- How can JD.COM gold bars reduce interest rates?