Mailinglisten-Archive |
Michael Borchers wrote:
>> Michael Borchers wrote:
>>> <input type="file" name="files[]" id="files[]" />
>>> <input type="file" name="files[]" id="files[]" />
>>> ...
>>>
>>> aber die array formatierung die ich erhalte ist diese:
>>> ...
>>> Array
>>> (
>>> [name] => Array
>>> (
>>> [0] => test.txt
>>> [1] => test.zip
>>> )
>>>
>>> [type] => Array
>>> (
>>> [0] => text/plain
>>> [1] => application/x-zip-compressed
>>> )
>>> ...
>>>
>>>
>>> wie kriege ich es vernünftig in zwei verschiedene arrays,
>>> sprich
>> Durch ändern des Formulars gar nicht!
>>
>> Wenn du es unbedingt anders haben willst dann musst du das händisch in
>> PHP machen, nachdem du das Formular empfangen hast.
>
> ich muss die dateien einzeln untersuchen, um diese später einzeln als
> attachments an eine email anzuhängen, sprich
>
> foreach($FILES as...)
>
> attach($file);
Und?
foreach ($_FILES['name'] as $key => $name) {
echo $_FILES['type'][$key];
echo $_FILES['tmp_name'][$key];
echo $_FILES['error'][$key];
echo $_FILES['size'][$key];
...
}
--
Sebastian Mendel
www.sebastianmendel.de
www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet
php::bar PHP Wiki - Listenarchive