After my test form textarea line break, in windows it is rn, in linux it is n (this is not tested), in addition, in win, r, n have a line break function.
After my test form textarea line break, in windows it is rn, in linux it is n (this is not tested), in addition, in win, r, n have a line break function.
Escape characters:
N line feed (lf or ascii characters 0 × 0a (10 ))
R press enter (cr or ascii character 0 × 0d (13 ))
T horizontal tab (ht or ascii character 0 × 09 (9 ))
/Backslash
$ Dollar Sign
Double quotation marks
[0-7] {} the regular expression sequence matches a character represented by the octal symbol
X [0-9a-fa-f] {} this regular expression matches a character in a sequence expressed in hexadecimal notation
Conclusion: many friends say that the newline code n in textarea is like this in str_replace ("n ","
"), But we do not know that this is not the Windows standard line feed. we should change it to str_replace (" nr ","
") Then OK.