# Problem with URLLoader - newbie here

**URL:** <https://forum.kirupa.com/t/problem-with-urlloader-newbie-here/280981>\
**Category:** Uncategorized\
**Created:** [February 3, 2009, 5:54pm UTC](https://forum.kirupa.com/t/problem-with-urlloader-newbie-here/280981 "2009-02-03T17:54:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![panzhuli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@panzhuli](https://forum.kirupa.com/u/panzhuli)\
**Post date:** [February 3, 2009, 5:54pm UTC](https://forum.kirupa.com/t/problem-with-urlloader-newbie-here/280981/1 "2009-02-03T17:54:23Z")

</div>

hey all. I’m an AS3 newbie and want to replace some old loadVars() code with what works. Here’s what I have:

```auto

private function getPath(){
            var loader:URLLoader = new URLLoader();

            // specify format as being variables
            loader.dataFormat = URLLoaderDataFormat.VARIABLES;
           
            loader.addEventListener(Event.COMPLETE, varsLoaded);
           
            loader.load(new URLRequest("includes/config.php"));
           
            function varsLoaded (event:Event):void {
                loader.removeEventListener(Event.COMPLETE,varsLoaded);
                trace(loader.data is URLVariables); // true
                trace(loader.data["Path"])
            }

        }

```

And here’s what is kicked out in my output window:

```auto

".$Path.".".$pLocale);

    }

///////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////

?>

```

So it is reading the file, but not reading the name/value pair. Here’s what is in the config file:

```php

<?
$Path = "mysite.com";

[but waaaay down at the bottom]

if(isset($_GET['variable'])){
        echo("pathtoxml=".$pathtoxml."&Path=".$Path.".".$pLocale);
    }
?>

```

so it is actually reading the php file and taking it from this code and reading the variable to the actual end of the php file itself, including the closing brackets. If I delete this code, it returns “undefined”. Any help would be GREATLY appreciated!!!
