How are persistent database connections stored in

2019-05-07 07:50发布

As stated in the documentation on sqlite_popen php tries to make use of a persistent resource mechanism. Where is this mechanism described in detail? Is it possible to view all resources currently stored/used? Is it possible to access this mechanism and store/read other values?

1条回答
Juvenile、少年°
2楼-- · 2019-05-07 08:11

sqlite_popen uses the (executor) global hashtable "persistent_list" to store the connection resource. This hashtable is not part of the php "instance" which executes your script but of the php "runtime", which means it's not cleared/removed after the script is done but held in memory as long as the php .so/.dll/fastcgi.exe.
You cannot access EG(persistent_list) from within a php script but any php module/extension can.

查看更多
登录 后发表回答