~danbuk/pastebin-ng/refactor

« back to all changes in this revision

Viewing changes to htdocs/init.php

  • Committer: Daniel Bartlett
  • Date: 2008-02-05 00:30:06 UTC
  • Revision ID: dan@f-box.org-20080205003006-lkgvugsyg5lozsnr
Abstracted the site specific init file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
2
 
3
 
$PBASEDIR = "/Volumes/Users/dan/Documents/EclipseWorkspace/pastebin-ng";
 
3
include("init_site.php");
4
4
 
5
5
include($PBASEDIR . "/config/testing.conf.php");
6
6
include($PBASEDIR . "/classes/fbMySQL.php");
8
8
include($PBASEDIR . "/external/GeSHi/geshi/geshi.php");
9
9
 
10
10
$dba = new fbMySQL($config['dbserver'], $config['dbuser'], $config['dbpass']);
 
11
if($dba == FALSE) {
 
12
        die("Error: Cannot connect to database server!");
 
13
}
11
14
 
12
15
$rtv = $dba->select_db($config['dbname']);
13
16
if($rtv == FALSE) {
14
 
        die("Error: Cannot connect to database!");
 
17
        die("Error: Cannot select database!");
15
18
}
16
 
 
17
 
 
18
 
 
19
 
?>
 
19
unset($rtv);
 
20
 
 
21
?>
 
 
b'\\ No newline at end of file'