array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.ibase-service-detach.php', 1 => 'ibase_service_detach', ), 'up' => array ( 0 => 'ref.ibase.php', 1 => 'Firebird/InterBase 関数', ), 'prev' => array ( 0 => 'function.ibase-service-attach.php', 1 => 'ibase_service_attach', ), 'next' => array ( 0 => 'function.ibase-set-event-handler.php', 1 => 'ibase_set_event_handler', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/ibase/functions/ibase-service-detach.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5, PHP 7 < 7.4.0)
ibase_service_detach — サービスマネージャとの接続を切断する
service_handle
データベースサーバーへの接続
例1 ibase_service_detach() の例
<?php
// リモートの Firebird サーバーにIPアドレスでアタッチ
if (($service = ibase_service_attach('10.1.1.199', 'sysdba', 'masterkey')) != FALSE) {
// アタッチ成功
// サーバーのバージョン('LI-V3.0.4.33054 Firebird 3.0'のようなもの)を取得
$server_version = ibase_server_info($service, IBASE_SVC_SERVER_VERSION);
// サーバーの実装を取得 ('Firebird/Linux/AMD/Intel/x64' のようなもの)
$server_implementation = ibase_server_info($service, IBASE_SVC_IMPLEMENTATION);
// サーバーからデタッチ(切断)
if(ibase_service_detach($service) == FALSE) {
echo "Error on service detach.";
}
else {
echo "Successfully detached from service.";
}
}
else {
// エラー時にはメッセージを出力
$conn_error = ibase_errmsg();
die($conn_error);
}
?>