Редакция 2 | Только различия | Учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 2 | Редакция 10 | ||
---|---|---|---|
1 | <?php
|
1 | <?php
|
2 | 2 | ||
3 | require_once "DB.php"; |
3 | require_once "DB.php"; |
4 | require_once "config.inc.php"; |
4 | require_once "config.inc.php"; |
5 | require "Smarty.class.php"; |
5 | require "Smarty.class.php"; |
6 | 6 | ||
7 | $dsn = "mysql://".$DBuser.":".$DBpass."@".$DBhost."/".$DBname; |
7 | $dsn = "mysql://".$DBuser.":".$DBpass."@".$DBhost."/".$DBname; |
8 | $options = array( |
8 | $options = array( |
9 | 'debug' => 2, |
9 | 'debug' => 2, |
10 | 'portability' => DB_PORTABILITY_ALL, |
10 | 'portability' => DB_PORTABILITY_ALL, |
11 | ); |
11 | ); |
12 | 12 | ||
13 | $db =& DB::connect($dsn,$options); |
13 | $db =& DB::connect($dsn,$options); |
14 | if (PEAR::isError($db)) { |
14 | if (PEAR::isError($db)) { |
15 | die($db->getMessage()); |
15 | die($db->getMessage()); |
16 | }
|
16 | }
|
17 | 17 | ||
18 | $smarty = new Smarty; |
18 | $smarty = new Smarty; |
19 | $smarty->compile_check = true; |
19 | $smarty->compile_check = true; |
20 | 20 | ||
21 | ?>
|
21 | ?>
|
22 | 22 |