Jump to content

Upload data to file from a specified post='thefiledata'


mikk809h

Recommended Posts

Hello

 

I am trying to make a basic website with an Lua emulator, which is going to upload a long string(a file),

so it can be processed and uploaded to the web...

 

I have the following code:


<?php
  $postdata=$_POST['POSTDATA'] or "WRONGDATA";
  $posttype=$_POST['POSTTYPE'] or "WRONGTYPE";
  $postname=$_POST['POSTNAME'] or "WRONGNAME";
  /*echo $postdata;*/
  $currentPath=$_SERVER['PHP_SELF'];
  $endPath=$currentPath.'/files/' . $posttype . '/' . $postname;
  move_uploaded_file($postdata, $endPath); /* but this line wont work with postdata... */
?>

 

I am uploading a long text with the following command line 

http://mywebsite.com/dev/upload.php?POSTDATA=allfiledata&POSTTYPE=program&POSTNAME=testprogram

 

 

Any help ie very appreciated!

 

 

Thanks in Advance

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.