JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
db_connect.php can now be in code/
[wfpl.git] / session.php
index 07b759a..7f5d52e 100644 (file)
 
 # you'll need this file that calles db_connect()
 if(!isset($GLOBALS['wfpl_db_handle'])) {
-       require_once('db_connect.php');
+       if(file_exists('db_connect.php') {
+               require_once('db_connect.php');
+       } elseif(file_exists('code/db_connect.php') {
+               require_once('code/db_connect.php');
+       } else {
+               die("session.php requires a file db_connect.php or that you call db_connect() first. See code/wfpl/db.php for more information.");
+       }
 }
 
 # and these database tables: