cvs: phpweb /include prepend.inc
| From: | Gabor Hojtsy | Date: | Sat, 14 Dec 2002 12:41:50 +0000 |
| Subject: | cvs: phpweb /include prepend.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14154@lists.php.net to get a copy of this message | ||
goba Sat Dec 14 07:41:50 2002 EDT
Modified files:
/phpweb/include prepend.inc
Log:
Add some code to handle variables nicely in scripts,
and a bit cleaning up (same comment signs, using
include_once, etc.)
Index: phpweb/include/prepend.inc
diff -u phpweb/include/prepend.inc:1.8 phpweb/include/prepend.inc:1.9
--- phpweb/include/prepend.inc:1.8 Tue Nov 26 15:41:26 2002
+++ phpweb/include/prepend.inc Sat Dec 14 07:41:50 2002
@@ -4,13 +4,26 @@
unset($RSIDEBAR_DATA);
unset($SIDEBAR_DATA);
-// Load in requires parts
-require_once 'site.inc';
-require_once 'layout.inc';
-require_once 'geoip.inc';
+// Backward compatible array creation. After this point, the
+// PHP 4.1.0+ arrays can be used to access variables coming
+// from outside PHP. But it should be noted that these variables
+// are not necessarily superglobals, so they need to be global-ed!
+if (!isset($_SERVER)) {
+ $_GET = &$HTTP_GET_VARS;
+ $_POST = &$HTTP_POST_VARS;
+ $_ENV = &$HTTP_ENV_VARS;
+ $_SERVER = &$HTTP_SERVER_VARS;
+ $_COOKIE = &$HTTP_COOKIE_VARS;
+}
-# this file is generated on rsync.php.net and propogated
-# from there it just defines $LAST_UPDATED.
-require_once 'last_updated.inc';
+// Load in always required parts
+include_once 'site.inc';
+include_once 'layout.inc';
+include_once 'geoip.inc';
+
+// This file is generated on rsync.php.net and propogated
+// from there. It just defines $LAST_UPDATED, which is the
+// mirror's last updated time.
+include_once 'last_updated.inc';
?>