The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I can't see any db close statement in php files like showthread.php. I wrote my own php file which uses the $db object, does it look right? Thanks!
PHP Code:
|
|
#2
|
|||
|
|||
|
Closing the database with the close like you have it isn't needed unless it's a persistent connection. A regular database connection is automatically closed at the end of execution of the script.
|
|
#3
|
|||
|
|||
|
Many thanks for your reply!
|
|
#4
|
|||
|
|||
|
$db->close() is called in most vb scripts - it's in function exec_shut_down() which is called from print_output(), which is the last function called in most scripts. (You can see it in the eval() at the end of showthread.php).
|
|
#5
|
|||
|
|||
|
Thanks for the detailed explanation, Kevin!
|
![]() |
|
|