SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Feb 2006
    Posts
    299
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help Me On Global Variables On Enviroment

    I have a propblem with some php scripts. I have downlaod some php scripts that were developed in php enviroment where global variables where on .I would liketo use them in my enviroment where global variables are off.
    I read some where it says I should put some php in code headers of thoses pages.

    Any one with such information so that can solve this problem. Please provide the code or where I can get the same code.

    PLEASE HELP

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    // Emulate register_globals on
    if (!ini_get('register_globals')) {
       
    $superglobals = array($_SERVER$_ENV,
           
    $_FILES$_COOKIE$_POST$_GET);
       if (isset(
    $_SESSION)) {
           
    array_unshift($superglobals$_SESSION);
       }
       foreach (
    $superglobals as $superglobal) {
           
    extract($superglobalEXTR_SKIP);
       }



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •