Do SQL connections opened with PDO in PHP have to be closed

后端 未结 6 1507
野的像风
野的像风 2020-11-28 07:36

When I open a MySQL connection in PHP with just PHP\'s built-in MySQL functions, I do the following:

$link = mysql_connect($servername, $username, $password)         


        
6条回答
  •  盖世英雄少女心
    2020-11-28 08:02

    When the PHP script finishes executing, all connections are closed. Also you don't have to explicitly close your connection with mysql_close().

提交回复
热议问题