PHP PHP interview questions summary of (a)

1, how to handle the load, high concurrency?

2, common PHP security attacks?

1. SQL injection vulnerability:. A reason: because there is no check or use a pre-made data submitted is treated as cause parameter sql statement is executed, the database caused some damage. . B Solution: checking for data, such as regular and the like; filtered special character string, such as! @ # ¥ * & <> and so on; the use of pretreatment, the basic open source frameworks have done this mechanism; 2. cross-site scripting vulnerability: a reason: Because the client submitted some scripts, etc., are stored in the server, the user. access to cause users to experience problems, stolen account number, etc., and even the sql injection like; b solution: do data validation, filtering out some of the labels, special string, and so on; 3. weak passwords . vulnerability: a reason: usually due to input some simple passwords, such as password: '123456', birthdays and so forth, resulting in very easy to know the user's account information; b solution: do some level of security check weak passwords directly is not permitted; 4. HTTP header Tracking vulnerability: a reason: Since the protocol specification defines http1.1 http trace method, will lead to the end customer request header information submitted returned in the response header; solution B: ban http trace method; 5. file upload vulnerability: a reason: when you upload files to filter file extensions and the type caused by lax, such as: required to upload jpg image, the result is a foot. To change the suffix jpg upload. . B Solution: to strengthen the implementation of restrictions on access to the file extension, file type and upload path; 6. unencrypted login request: a reason: the user names ,, passwords and other sensitive information is not encrypted to disclose information directly caused by the transmission. .; b solution: client password, or use the ssh encrypted transmission; 7. csrf attack:. a reason: with a browser user logs in the a site to get information after authorization. Visit "dangerous websites", because there is authorization information A website, resulting from accessing dangerous websites A website can also be operational functions A site, causing users to impersonate something; b Solution: put in a server a random number, to verify a client submits;

3, please say three methods to reduce page load times?

4, binary tree

5, http protocol which is controlled by a protocol field which buffer status code

6, tcp / ip protocol

7, udp protocol

8, bubble sort, the sort order, a binary search

9、

 

Guess you like

Origin www.cnblogs.com/xiaolongli/p/11418661.html