14 lines
445 B
PHP
Executable File
14 lines
445 B
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
require_once __DIR__ . '/_bootstrap.php';
|
|
|
|
try {
|
|
new PDO('sqlsrv:server=localhost; Authentication=SqlPassword; ConnectRetryCount=0; Database=example; LoginTimeout=1', 'userName', 'password');
|
|
} catch (PDOException $x) {
|
|
if (stripos($x->getMessage(), 'This extension requires the Microsoft ODBC Driver for SQL Server') !== false) {
|
|
fwrite(STDERR, trim($x->getMessage() . "\n"));
|
|
exit(1);
|
|
}
|
|
}
|