Update of /cvsroot/phpwebapp/web_app
In directory sc8-pr-cvs1:/tmp/cvs-serv5325
Modified Files:
class.WebApp.php
Log Message:
WebApp::to_url() fix
Index: class.WebApp.php
===================================================================
RCS file: /cvsroot/phpwebapp/web_app/class.WebApp.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** class.WebApp.php 15 Aug 2003 07:01:19 -0000 1.8
--- class.WebApp.php 15 Aug 2003 09:00:15 -0000 1.9
***************
*** 446,451 ****
function to_url($path)
{
! $doc_root = $_SERVER["DOCUMENT_ROOT"];
! $url = str_replace($doc_root, '', $path);
return $url;
}
--- 446,451 ----
function to_url($path)
{
! $DocumentRoot = ereg_replace(APP_URL."\$", '', APP_PATH);
! $url = str_replace($DocumentRoot, '', $path);
return $url;
}
|