可能重複:
What happens if MySQL connections continually aren't closed on PHP pages?當MySQL連接未關閉時會發生什麼?
如果你忘記了,有時關閉連接會在一段時間密切,自動或將繼續開放?
$link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);
$db = mysql_select_db(DB_DATABASE);
.
.
your code
.
.
and you forget to mysql_close($link);
http://stackoverflow.com/questions/103281/what-happens-if-mysql-connections-continually-arent-closed-on-php-pages – Fge
當頁面完成時,連接關閉但它是當您完成時關閉連接的良好做法。 – Drewdin