[About whether md5 is enough] 50 thousand data, MD5 began to appear again! If you are confused about the database table pre_post, The Field id is automatically incremented and the primary key is used. The md5 field is unique. The initial field md5 value is & nbsp; $ md5 = md5 (time (). $ ip); later changed to only & nbsp; $ md5 = md5 (& nbsp; time () & nbsp ;); then, each time thousands of write operations are performed, 50 thousand data will be output [about whether md5 is enough]. MD5 begins to repeat! Doubt
Database table pre_post, Field id auto increment, primary key. The md5 field is unique.
The initial field md5 value is $ md5 = md5 (time (). $ ip );
Later it was changed to only $ md5 = md5 (time (); then, md5 duplication occurs every time thousands of writes, #1062:
#1062-Duplicate entry 'dbecd780b5f02c35f236ac0f4766c634 'for key 'md5'
// Original md5 generation, $ ip is the client IP address of the visitor
$ Md5 = md5 (time (). $ ip );
// The current md5 generation is based only on the current timestamp
$ Md5 = md5 (time ());
One question: the first time Segment encryption is from time (). $ ip, and the second time is changed to time (). In this case, the generated md5 will not be duplicated. However, the md5 generated in the second phase is the same as the md5 generated in the first phase, and it is repeated several times every less than 1 thousand times. Confused
------ Solution --------------------
Microtime ()