LoginSignup
1
1

PHP oci_connect で AWS(RDS) oracleDBへ接続方法

Last updated at Posted at 2022-08-20

AWS RDS へ接続。

お使いのDBの値へ入れ替えてください。

コード

index.php

// エラーを出力する
ini_set('display_errors', "On");

$conn = oci_connect('ユーザー名','パスワード','orcl-03.cbmsqs9alrus.ap-northeast-1.rds.amazonaws.com/orcl','AL32UTF8');

if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}else{
    echo "接続完了!";
}

?>



1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1