반응형 php db 연결 테스트1 [PHP] Postgresql DB Connect Test db_test.php $host = 'XXXX'; $port = '5432'; $dbname = 'xxxx'; $user = 'xxxx'; $password= 'xxxx'; $conn = pg_connect("host={$host} port={$port} dbname={$dbname} user={$user} password={$password}") or die('Could not connect: '.pg_last_error()); $res = pg_query("SELECT CURRENT_TIMESTAMP"); $arr = pg_fetch_all($res); print_r($arr); DB Test php db_test... 2022. 4. 19. 이전 1 다음 반응형