-
Notifications
You must be signed in to change notification settings - Fork 24
/
bootstrap.dist.php
39 lines (28 loc) · 926 Bytes
/
bootstrap.dist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace zf2bootstrap;
use Zend\Loader\StandardAutoloader as Autoloader,
Zend\Db\Adapter\Adapter as DbAdapter;
require_once './includes/functions.php';
include 'Zend_Db-2.0.0dev.phar';
//require_once '/path/to/ZF2/library/Zend/Loader/StandardAutoloader.php';
//$autoloader = new Autoloader;
//$autoloader->register();
$dbconfig = array(
// Sqlite Configuration
'driver' => 'Pdo',
'dsn' => 'sqlite:' . __DIR__ . '/tmp/sqlite.db',
// Mysqli Configuration
//'driver' => 'Mysqli',
//'hostname' => 'localhost',
//'username' => 'developer',
//'password' => 'developer',
//'database' => 'zend_db_example',
//'table_type' => 'InnoDB'
// Sqlsrv Configuration
//'driver' => 'Sqlsrv',
//'hostname' => 'MYHOSTNAME-PC\SQLEXPRESS',
//'UID' => 'developer',
//'PWD' => 'developer',
//'Database' => 'zend_db_example'
);
return new DbAdapter($dbconfig);