Oracle B25-317-01 Manuel d'utilisateur Page 24

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 94
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 23
Disconnecting from the Database
3-6 Oracle Database Express Edition 2 Day Plus PHP Developer Guide Beta Draft
open simultaneously. The connection performance benefits need to be balanced with
the overhead on the database server.
Persistent connections are made with the OCI8 oci_pconnect() function. The
lifetime of persistent connections can be controlled by several settings in the PHP
initialization file. Some the settings include:
oci8.max_persistent - controls the number of persistent connections per process.
oci8.persistent_timeout - specifies the time (in seconds) that a process maintains an
idle persistent connection.
oci8.ping_interval - specifies the time (in seconds) that must pass before a persistent
connection is "pinged" to check its validity.
See the PHP reference manual http://www.php.net/manual/en/ref.oci8.php
for more information.
Disconnecting from the Database
The PHP engine will automatically close the database connection at the end of the
script unless a persistent connection was made. To explicitly close a database
connection you may call the oci_close() OCI function with the connection
identifier returned by the oci_connect() call. For example:
<?php
$conn = oci_connect('hr', 'hr', '//localhost/XE');
...
oci_close($conn);
...
?>
Vue de la page 23
1 2 ... 19 20 21 22 23 24 25 26 27 28 29 ... 93 94

Commentaires sur ces manuels

Pas de commentaire