[ kragujevcanin @ 15.06.2010. 02:53 ] @
Zelim da iz flash-a upisem string u txt datoteku preko php-a, tj.. Recimo da imam as3 kod: var variables:URLVariables = new URLVariables(); variables.nekitext="blabla"; var urlRequest:URLRequest=new URLRequest("upisi.php"); //php fajl urlRequest.method=URLRequestMethod.POST; urlRequest.data=variables; sendToURL(urlRequest); Php kod: <?php $unos = $_POST("nekitext") print $unos; $file = 'text.txt'; if($handle = fopen($file,'at')) { fwrite($handle, $unos); fclose($handle); } else { echo "Greska prilikom otvaranja"; } ?> Vrlo jednostavno, ne prijavljuje gresku ali prilokom izvodjenja nista se ne upisuje u txt fajl.(php je aktivan naravno). |