Logging is vital. you can not only record error information, but also record a lot of information, such as order flow.... using php file operations to achieve custom logging is extremely simple! See the following simple php code: & amp; lt ;? Phpfu
Logging is vital. you can not only record error information, but also record a lot of information, such as order flow.... using php file operations to achieve custom logging is extremely simple!
Take a look at the following simple php code:
Running result: (the error. log file is created in the current directory. the file content is as follows :)
[12:31:20] non-numeric characters [12:31:43]
A simple function enables logging and recording the date of adding each log. it is not difficult to find that the following three steps are used to implement custom logging:
1. open the log file (New if no log file exists)
2. append logs
3. close the file
You can complete the above php code!