php - mysql pconnect ,当它关闭连接时

标签 php mysql

一般来说,

对于 mysql_connect 有 mysql_close ,

但是mysql_pconnect没有任何关闭函数,

我在所有线程和教程中看到,他们都说对于 mysql pconnect ,

First, when connecting, the function would first try to find a (persistent)
link that's already open with the same host, username and password.
If one is found, an identifier for it will be returned instead of 
opening a new connection. 

FRO ---> php.net manual

b 默认情况下 mysql_pconnect 没有关闭函数,那么在教程中,

为什么他们这么说

the function would first try to find a (persistent) link that's already open with the same host

根据这一行:--可能在某些情况下,mysql_pconnect 连接将关闭,

那么当这个连接将关闭时,在什么情况下连接进入关闭模式,

或者是否有关闭连接超时或时间限制,

我觉得这个问题有点幼稚,

最佳答案

当 Web 服务器或 FastCGI 进程终止时,连接将关闭。

关于php - mysql pconnect ,当它关闭连接时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4154055/

相关文章:

php - 如何在laravel中添加登录功能?

php - Symfony2 形式 + 学说 - 选择的选择

MySQL 到 MongoDB 的转换

mysql - 使用查询从连接的表中检索数据

mysql - 如何向 mySQL 中已存在的表添加约束?

PHP 按受欢迎程度排序

javascript - 如何在javascript中连接php数据库文件?

php - ajax 发布但无法阻止刷新

php - 有选择地进入 cassandra 比正常获取更快?

php - 使用 JOIN 运算符从 MySQL 查询返回数组