©
Dokumen ini menggunakan Manual laman web PHP Cina Lepaskan
(PHP 5)
mysqli::close -- mysqli_close — 关闭先前打开的数据库连接
面向对象风格
过程化风格
$link
)关闭先前打开的数据库连接
link
仅以过程化样式:由 mysqli_connect() 或 mysqli_init() 返回的链接标识。
成功时返回 TRUE
, 或者在失败时返回 FALSE
。
See mysqli_connect() .
[#1] php at dafydd dot com [2008-11-07 13:03:53]
I've had situations where database connections appeared to persist following php execution. So, now, my __destructor function explicitly contains a $cxn->close(). It hurts nothing, and helps avoid memory leaks.