Re: Out with the new, In with the old
| From: | John Nichel | Date: | Thu, 12 Dec 2002 15:50:37 +0000 |
| Subject: | Re: Out with the new, In with the old | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128019@lists.php.net to get a copy of this message | ||
You can prepend a file to your site by using a .htaccess file.
Scott Houseman wrote:
Hi Try and get them (your hosting company)to configure your site with a prepend file e.g. prepend.php for your domain. in this file, do something like: <?php // // DECLARE ARRAYS // $_GET = array( ); $_POST = array( ); $_SERVER = array( ); // etc...... while ( list( $sKey, $mVal ) = each( $HTTP_GET_VARS ) ) {-- By-Tor.com It's all about the Rush http://www.by-tor.com$_GET{$sKey} = $mVal;} // Do this for all arrays which you want to use in your code. ?> As this file will be auto prepended everytime php is invokded, these variables will always be available, although they will NOT be global. That might be a problem if you are using them in the global scope. Hope this is useful. Cheers Scott On 2002/12/12 08:14, Jonathan wrote:I began to develop a small session based shopping cart using newer syntax. For example, $_SERVER, $_REQUEST, $_SESSION, etc. Anyway, I'm almost done with the cart and just found out that the hosting company for the client is running PHP 4.0.6. Is there anyway around this besides changing all of my variable names? =================== Jonathan Villa Application Developer IS Design & Development www.isdesigndev.com <http://www.isdesigndev.com/> 414.429.0327 ===================