tags:

views:

14

answers:

1

how can i receive a file sent by an applet to the server by an applet to the server by post method when on server i need a php file to receive it how can i do so?

i tried this;

<?php
$img_data = $_POST['txt'];
$fp = fopen('test.doc', 'w');
fwrite($fp, $img_data);
fclose($fp);
?>
+1  A: 

Check out the PHP manual on handling file uploads. There's a full example there (Example #2) that should get you started well.

Pekka