Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当制作的脚本@mysql_connect($server, $user, $password)死亡时会发生什么? 它能活多久?
@mysql_connect($server, $user, $password)
谢谢!
由 mysql_connect() 打开的连接在脚本退出时关闭,除非通过调用 mysql_close() 提前关闭。
http://www.phpdig.net/ref/rn41re774.html
它会在您的脚本结束时关闭,但最好使用显式关闭它mysql_close()- 在您不需要它时释放链接。
mysql_close()