Multiline String variable
Hello everyone
I need to place a multiline text into a .txt file.
Have a .php service file that creates a file from App's parameters sended to it:
<?php
$getVar = $_POST['TheString'];
$file = 'test.txt';
$writeVar = fopen($file,'w');
fwrite($writeVar,$getVar);
fclose($writeVar);
?>
and the collection of AS service functions to send parameters.
private function sendData(str:String):void {
variables = new URLVariables();
fData = new URLRequest("fileservices/SaveService.php");
fData.method = URLRequestMethod.POST;
fData.data = variables;
fLoader = new URLLoader();
fLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
fLoader.addEventListener(Event.COMPLETE, sendComplete);
variables.TheString = str;
fLoader.load(fData);
}
All works, but can only write a single-line string into a file.
when send a string containing '/n' paragraph character, it does not work in .txt file opened with Notepad.
So, what is that specific character to use to mark paragraphs returns,
or should i use the different class instead of String,
or have i to edit my .php file to add such usability (and what is that magic changes to bring)?
Thanks in advance
