学会放弃

my blog is here

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

# tnsnames.ora Network Configuration File: D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.

TEST =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = leohuang)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test)
    )
  )

ASF =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ASF02)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ASF)
    )
  )


用下面的话,就可以在php中访问连接了
$conn = oci_connect('asfcms', 'beehive', 'ASF');
if (!$conn) {
  $e = oci_error();
  print htmlentities($e['message']);
  exit;
}

posted on 2006-08-30 17:17  leohuang  阅读(1193)  评论(0编辑  收藏  举报