ok, here is what i was trying to do. i wanted to use php backend for flash to read and write in text files. but there is a problem.

my flash actionscript:
Code:
fname="ca.txt";
	_root.strText="Loading... Please wait...";
	loadVariablesNum("readMain.php?fname="+fname,0,"GET");
and my php code:
Code:
<?
#read the main file for contents

#first open the file
$fname=$_GET["fname"];
if ($fname == "") {
    $fname="ca.txt";
}

$file=fopen($fname,"rb");

#read from file and close it
$mtext=fread($file,filesize($fname));
fclose($file);

echo "strText="+$mtext;
?>
its not working. the flash shows the loading part and halts.

what am i doing wrong?