I am sending a compressed bytearray to PHP:

 

var XMLOut:ByteArray = new ByteArray();

XMLOut.writeUTFBytes("<root><item1>just an example</item1></root>");

XMLOut.compress();

. cut .

 

The data is POSTed (with URLLoader in var XMLString) to
mydomain.com/save.php:

 

<?php   

  $XMLString = gzuncompress($_POST["XMLString "]); 

  $handle = fopen("content/test.xml", "w+b");

  fwrite($handle, $ XMLString);

  fclose($handle);

?>

 

The result of this is that test.xml is being created but without any
content.

(BTW: If I leave out the compression/decompression part then the file is
created with the expected content)

 

Should this actually work with gzuncompress and if so why might it be
failing here?

Or should the uncompressioning be handled differently?

 

 

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to