X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=test%2Fsession_test.php;h=6537e132eca743344e902a362fbc520ef6285763;hb=fe9a487e1b5ed0700481aee4609055dc6c47505d;hp=8defd9e6a2ffdfe4ba0663f61fe9f617dd288649;hpb=af5b67ada7a9801a6ed36df4026a2a09110700e6;p=wfpl.git diff --git a/test/session_test.php b/test/session_test.php index 8defd9e..6537e13 100644 --- a/test/session_test.php +++ b/test/session_test.php @@ -5,11 +5,9 @@ # To run this file: # -# 1) make a link to it from your website directory which has the code/ directory in it +# 1) edit inc/wfpl/test/session_test_db_connect.php to connect to your TESTING database # -# 2) edit code/wfpl/test/session_test_db_connect.php to connect to your TESTING database -# -# 3) add the wfpl_session tables to your TESTING database: +# 2) add the wfpl_session tables to your TESTING database: # # create table wfpl_sessions (id int unique auto_increment, session_key varchar(16), length int, expires int); # create table wfpl_session_data (id int unique auto_increment, session_id int, name varchar(100), value text); @@ -18,8 +16,8 @@ # WARNING: this code deletes all wfpl sessions. Do not use on a live site's database ############## -require_once('code/wfpl/test/session_test_db_connect.php'); -require_once('code/wfpl/session.php'); +require_once(__DIR__.'/'.'session_test_db_connect.php'); +require_once(__DIR__.'/../'.'session.php'); function session_dump($message) { $ses = db_get_rows('wfpl_sessions', 'id,session_key,length,expires'); @@ -48,7 +46,7 @@ function session_dump($message) { function session_test() { - tem_load('code/wfpl/test/session_test.html'); + tem_load(__DIR__.'/'.'session_test.html'); db_delete('wfpl_sessions'); db_delete('wfpl_session_data'); @@ -83,5 +81,3 @@ function session_test() { tem_output(); } - -?>