$conn_string="host=sheep port=5432 dbname=test user=lamb password=bar"; $dbconn4=pg_connect($conn_string); //connect to a database named "test" on the host "sheep" with a username and password ?> connection_string所包括的參數(shù)有host,port,tty,options,dbname,user和password。
www.dbjr.com.cn/shouce/php5/zh/function... 2025-5-27