----- Original Message ----- 
From: "bryan_is_south"
Hi all,

This is probably a noob question:

I am creating a site on my local computer only...not on a server, and
I have an upload file part (<input type='file'>), but I want to know
if it is possible to still have the files go to a certain directory on
my own computer.
In other words, to make sure its working right before it goes up on a
real server, I test it and select a file in one directory, and when i
submit it, that file automatically is copied and pasted (still in the
original directory too, only a copy would be made) into the new directory.

Thanks,

-bryan


------------------------------------

Tested and workin - 
<form enctype="multipart/form-data" action="" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
File 1: <input name="file1" type="file" /><br />
File 2: <input name="file2" type="file" /><br />
<input type="submit" value="Send File" />
</form>
<?php

if(!isset($_FILES))
  {
  echo("There are no files uploaded\n");
  die();
  }
foreach($_FILES as $key => $thisfile)
  {
  echo("For the form input name that is [" . $key);
  echo("]<br />\n<br />\n");
  echo("Remote file (name) is [" . $thisfile['name']);
  echo("]<br />\n");
  echo("Browsers suggested mime (type) is [" . $thisfile['type']);
  echo("]<br />\n");
  echo("Actual file (size) is [" . $thisfile['size']);
  echo("]<br />\n");
  echo("Server temporary name (tmp_name) is [" . $thisfile['tmp_name']);
  echo("]<br />\n");
  echo("Upload (error) is [" . $thisfile['error']);
  echo("]<br />\n<br />\n<br />\n<br />\n");
  }

?>

Reply via email to