0
我有以下代码连接到psql。 “test1”是页面上显示的唯一内容,意味着pg_connect中出现了问题,但“无法连接”消息也不会显示。这里可能会出现什么问题?我使用的是相同的证书,允许我通过navicat进行连接。Pg_connect或死()不返回任何东西
<?php
echo 'test1';
$dbconn = pg_connect("host=localhost port=5439 dbname=mydb user=myuser password=mypass") or die('Could not connect: ' . pg_last_error());
echo 'test2';
?>
尝试改变连接线'...或死亡(“不能连接');'看看是否有任何区别? –