Skip to content

Instantly share code, notes, and snippets.

@viccherubini
Created June 19, 2010 23:41
Show Gist options
  • Select an option

  • Save viccherubini/445404 to your computer and use it in GitHub Desktop.

Select an option

Save viccherubini/445404 to your computer and use it in GitHub Desktop.
<?php
function setUp() {
$pdo = new \PDO(DB_DSN, DB_USERNAME, DB_PASSWORD);
$sqlFile = DIRECTORY_DATA . 'SqlTest-' . DB_TYPE . '.sql';
if ( true === is_file($sqlFile) ) {
$sqlData = @file_get_contents($sqlFile);
$pdo->exec($sqlData);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment