thinkphp data exception phpbug
As shown in the figure, when the first two print_r have exit statements at the back, the data printed by print_r is normal. However, if you put exit after the sentence of inserting records (the sentence in the red box), some of the things printed will become null.
Obviously, the above $_GET and data were modified when executing the insert statement. But the printing is before the insert statement.
The picture below is the print_r print after the exit statement is placed after the insert statement;
The following is the print_r print after the exit statement is placed before the insert record
This problem has troubled me for a long time, and I never know how to solve it. I hope someone who understands or has encountered the same problem can give me answers or discuss it together.
Isn’t exit already ending the current script? What you defined should not take effect. How can you add it?
If you use the D("") method, check if the corresponding model has rewritten the add() method and added some field filtering or permission checking, or try changing D() to M(). Try