Login | ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/prepend/trunk/php_auto_pre/002-register-globals.php
Revision: 2
Committed: Thu May 2 09:34:17 2019 UTC (12 months, 4 weeks ago) by daniel-marschall
File size: 825 byte(s)
Log Message:
Initial release to SVN

File Contents

# Content
1 <?php
2
3 $xxx_directories_need_registerglobals = array(
4 // Webseiten, die teilweise noch register_globals erfordern
5 '/home/viathinksoft/public_html',
6 '/home/weiherhaus/public_html',
7 '/home/gastro-websoft/public_html'
8 );
9
10 // ---
11
12 $xxx_go = false;
13 foreach ($xxx_directories_need_registerglobals as $xxx_directory_need_registerglobals) {
14 if (strpos($_SERVER['SCRIPT_FILENAME'], $xxx_directory_need_registerglobals) === 0) {
15 $xxx_go = true;
16 }
17 }
18 unset($xxx_directories_need_registerglobals);
19 unset($xxx_directory_need_registerglobals);
20 if ($xxx_go) {
21 # Warum so viele ___ ? Damit man auf keinen Fall ein GET/POST Argument mit diesen Variablen ├╝berschreibt!
22 foreach ($_REQUEST as $___key___ => $___val___) {
23 global ${$___key___};
24 ${$___key___} = $___val___;
25 }
26 unset($___key___);
27 unset($___val___);
28 }
29 unset($xxx_go);