소스 검색

Agregar variable de ambiente

Santiago Gutiérrez Morales 1 년 전
부모
커밋
6afb24b222
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      include/bd_pdo.php

+ 4 - 2
include/bd_pdo.php

@@ -1,8 +1,10 @@
 <?php
 $db_name = 'sgi';
 try {
-    //$pdo = new PDO("pgsql:host=127.0.0.1;port=5432;dbname=".$db_name, "apsa_usr", 'Apsa&bd.##');
-    $pdo = new PDO("pgsql:host=200.13.89.8;port=5432;dbname=".$db_name, "apsa_usr", 'Apsa&bd.##');
+  	if(isset($_ENV['pruebas'])
+    	$pdo = new PDO("pgsql:host=200.13.89.27;port=5432;dbname=".$db_name, "apsa_usr", 'Apsa&bd.##');
+  	else
+    	$pdo = new PDO("pgsql:host=200.13.89.8;port=5432;dbname=".$db_name, "apsa_usr", 'Apsa&bd.##');
 } catch (PDOException $e) {
     echo "Error de conexión! ";
     print_r($e->getMessage());