Skip to content

Instantly share code, notes, and snippets.

mattstein / db-test.php
Last active Oct 8, 2021
PHP MySQL/PostgreSQL Connection Test
View db-test.php
* Database Connection Tester
* A quick-and-dirty standalone script for checking PHP’s connection to a
* MySQL (or MariaDB) or PostgreSQL database.
* To use, enter the settings below and run the following from your terminal:
* ```
* php -f db-test.php