I have to do something new every time, which is very unaccustomed. Can I use the functions in the class directly? The purpose of using the class is to look at the static attributes inside, so that when operating redis or mysql, automatic connection and connection reuse can be realized without the need to perform the connection operation multiple times. If I have to add new every time I use it. Isn’t that the same as before?
I don’t know if there is such a method. I just started to relearn class recently.
只争朝夕2022-12-23 12:39:14
I just thought of using static variables. The experiment was successful. I don’t need to consider rewriting everything with classes for the time being. I just don’t know if there are any side effects.