not submitting as array from form...

See all posts See thread Reply

Re: not submitting as array from form... new!
by colin, 17 years, 7 months ago
I don't know Multipowupload, I will have a look.

But apparently, there is a PHP wrapper for it here. In the cade there for PHP, it seems that it actually populates $_FILES.

In any case, with the class, you can process local files:
$foo->process('/path/to/local/file.jpg');
Wouldn't it be a solution?Reply
Re: not submitting as array from form... new!
by dea, 17 years, 7 months ago
Thanks for the response!

Hmm, interesting on the local files approach, hadn't really looked at that. I guess I still wonder then at how to go through the files I've just uploaded with this module. This is the out of the box snippet that works:

if(count($_FILES) > 0) {
  $arrfile = pos($_FILES);
  $uploadfile = $uploaddir . basename($arrfile['name']);
  if (move_uploaded_file($arrfile['tmp_name'], $uploadfile))
  echo "File is valid, and was successfully uploaded.\n";
} else
  echo 'No files sent. Script is OK!'; //Say to Flash that script exists and can receive files
echo 'Here is some more debugging info:';
print_r($_FILES);

So it's populating $_FILES as you say, but not with a named array (sorry, that's horribly wrong wording) like with your example: $_FILES['myfield']Reply