Send data to Text file in Flash
-
Can anybody tell me how to send data to text file from flash 8. My code is : // This is written in Flash myData = new LoadVars(); myData.onLoad = function(){ if(this.writing==”Ok”) { trace (”Data saved”); } else { trace(”Data Not saved”); } } Submit.onPress=function() { myData.notes = notes.text; trace(myData.notes); myData.sendAndLoad(”save.[php”, myData, “POST”); notes.text=”"; } //Code in PHP <?php //Capture data from $_POST array $notes = $_POST[’notes’]; //Make one big string in a format Flash understand $toSave =$notes; echo $notes; //Open a file in write mode $fp = fopen(”E:\ABAP\NotesFile.txt”, “w”); if(fwrite($fp, $toSave)) echo “writing=Ok&”; else echo “writing=Error&”; fclose($fp); ?> Still it doesn’t work. It doesn’t save data in text file and shows Data not saved message..