日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

php mysqli::close()

發(fā)布時(shí)間:2025/3/14 数据库 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php mysqli::close() 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Anonymous (24-Apr-2010 05:43)

?

The mysqli_close() function and object method only remove the ability to use the mysql object again in the script, essentially on the surface only nulling out all object parameters.
過程化的mysqli_close()函數(shù)和面向?qū)ο蟮姆椒ㄕ{(diào)用只是不讓用戶在此后的腳本中再使用mysql對(duì)象,基本上只在表面上歸零所有對(duì)象參數(shù)

At least with PHP5.3.2 and Windows connecting by tcp, this differs by the old mysql_close() function in that it does not actually close out the tcp socket being used.? You should always use mysqli_kill() function before mysqli_close() to actually close and free up the tcp socket being used by PHP.? Garbage collection after script execution nor mysqli_close() do not kill the tcp socket on their own.? The socket would otherwise remain in 'wait' state for approximately 30 seconds, and any additional page loads/connection attempts would only add to the total number of open tcp connections.? This wait time does not appear to be configurable via PHP settings.
至少在利用windows的tcp連接的這個(gè)版本的php中,舊的函數(shù)并沒有真正的關(guān)閉正在被使用的tcp連接,你應(yīng)該總是在調(diào)用mysqli_close()前使用mysqli_kill()函數(shù),確保釋放php正在使用的tcp套接字連接。腳本結(jié)束后執(zhí)行g(shù)c要么mysqli_close()是不會(huì)自己殺掉這個(gè)tcp連接的。這個(gè)tcp連接會(huì)保持大約30秒的等待狀態(tài),期間任何頁面的加載或連接的嘗試都會(huì)增加連接的總數(shù),而這個(gè)等待時(shí)間似乎在php的配置文件中是不能設(shè)置的
Also as of this version, mysqli created links cannot be "deactivated", and will continue to accumulate in process memory until the PHP server or process is restarted, essentially making mysqli.max_links = -1 required.
另外在這個(gè)版本中,mysqli創(chuàng)建的連接是不能被設(shè)置為無效的,而且連接會(huì)在這個(gè)進(jìn)程中積累,知道php服務(wù)器或者進(jìn)程重啟,所以可以設(shè)置mysqli.max_links = -1

轉(zhuǎn)載于:https://www.cnblogs.com/iLoveMyD/archive/2012/02/28/2370715.html

與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖

總結(jié)

以上是生活随笔為你收集整理的php mysqli::close()的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。