Update of /cvsroot/phpwebapp/empty-sample
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9215
Modified Files:
webapp.php
Log Message:
bugfix; because of this, .js and .css files are not loaded properly in the
browser, if the application is installed directly at document root
Index: webapp.php
===================================================================
RCS file: /cvsroot/phpwebapp/empty-sample/webapp.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** webapp.php 8 Sep 2003 13:23:30 -0000 1.3
--- webapp.php 19 Sep 2005 07:18:02 -0000 1.4
***************
*** 33,37 ****
define("APP_PATH", $app_path);
$script_name = $_SERVER["SCRIPT_NAME"];
! $app_url = dirname($script_name)."/";
define("APP_URL", $app_url);
--- 33,38 ----
define("APP_PATH", $app_path);
$script_name = $_SERVER["SCRIPT_NAME"];
! $app_url = dirname($script_name);
! if ($app_url!='/') $app_url.='/';
define("APP_URL", $app_url);
|