sync_upload.php 349 B

123456789101112131415161718
  1. <?php
  2. /* PUT data comes in on the stdin stream */
  3. $putdata = fopen("php://input", "r");
  4. /* Open a file for writing */
  5. $fp = fopen("mysql_import/".$_GET["file"], "w");
  6. /* Read the data 1 KB at a time
  7. and write to the file */
  8. while ($data = fread($putdata, 1024))
  9. fwrite($fp, $data);
  10. /* Close the streams */
  11. fclose($fp);
  12. fclose($putdata);
  13. ?>