使用PHP集成的Flash:可变错误

I'm starting to learn how to integrate flash with php files and I'm having trouble with the retrieving of variables.

Here's my AS3 code:

var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, varsLoaded);
loader.load(new URLRequest("http://localhost/flash.php")); 

function varsLoaded (event:Event):void {
    trace(loader.data); // sample text

}

And my PHP file goes something like this:

<?php

    $txt = "sample text";
    print "myVar = $txt";

?>

I changed the value of myVar but the changed value does not apply. Please help.