Last active
December 19, 2024 10:31
-
-
Save Tynael/a27205c26ed3edb033ac8ea6aeb6e8f0 to your computer and use it in GitHub Desktop.
Test PostgreSQL default connection with PHP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
var_dump( | |
pg_connect(" | |
host=localhost | |
port=5432 | |
dbname=postgres | |
user=postgres | |
password=root | |
") | |
); | |
// Returns the PgSQL\Connection object if the connection is successful. | |
// Otherwise, returns false | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example used in https://neutrondev.com/setup-postgresql-in-xampp-for-windows/