Close MySQL connection (PHP)

前端 未结 3 1268
臣服心动
臣服心动 2021-01-15 07:56

I wrote a class to create an automated connection with MySQL and create queries. Here\'s how it looks like:

include(\"constants.php\");

class MySQLDB {
             


        
3条回答
  •  感情败类
    2021-01-15 08:34

    Have a look at the __destruct() method add add that into your class and your close connection in there

提交回复
热议问题