X-Git-Url: https://jasonwoof.com/gitweb/?p=wfpl.git;a=blobdiff_plain;f=run.php;h=8cf9d4d14690923ee98e115ab0aee5085e3ffa01;hp=a310e3f7728c2daa3a4c3f0b6765a96c0bbb2605;hb=e057305351d93155bf9f0d2c664b6eb859d83bf4;hpb=8e61d658c67b8782612820211862ee0df243891d diff --git a/run.php b/run.php index a310e3f..8cf9d4d 100644 --- a/run.php +++ b/run.php @@ -41,12 +41,12 @@ # RewriteRule ^$ /foo/run.php # RewriteRule ^foo/[^/]*\.html$ /foo/run.php -require_once('code/wfpl/file_run.php'); -require_once('code/wfpl/http.php'); -require_once('code/wfpl/template.php'); +require_once(__DIR__.'/'.'code/wfpl/file_run.php'); +require_once(__DIR__.'/'.'code/wfpl/http.php'); +require_once(__DIR__.'/'.'code/wfpl/template.php'); -if(file_exists('code/config.php')) { - file_run('code/config.php'); +if(file_exists(__DIR__.'/'.'code/config.php')) { + file_run(__DIR__.'/'.'code/config.php'); } # pass the basename of the page you want for normal execution @@ -156,8 +156,8 @@ function run_php($dest = false) { } - # You'll probably want to require_once('code/wfpl/messages.php') or - # require_once('code/wfpl/session_messages.php') in code/config.php + # You'll probably want to require_once(__DIR__.'/'.'code/wfpl/messages.php') or + # require_once(__DIR__.'/'.'code/wfpl/session_messages.php') in code/config.php if(function_exists('display_messages')) { if(function_exists('atexit_now')) { atexit_now();