Jump to content

zoetway

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

zoetway's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Found out wat I was doing wrong. The function [i]move_uploaded_file[/i] deletes files from the tmp directory that is used to store the POST $_FILES. I was trying to send that file to my upload function ::). Got around it by uploading only one file and usnig the[i] copy[/i] function to create two duplicates which can then be resized.... Sounds like an awful lot of work for what I wanted to do. I'm sure there's an more efficient way but this'll do for now. I am using the methods described by Daniel0 and glenelkins now (thanks again both of you!).
  2. Right, but still, I'm using only one file box right now and call the same variable 3 times (even echo doesn't do anything). I changed the page to a form with one input box  (removed the javascript) with a name file_1, pass it through POST with $_FILE['file_1']['tmp_name'] and put it in $files. If I echo $files 3 times I get the tmp_name once and two empty lines ????
  3. Thanks Daniel0, that makes sense. But it doesn't explain why the first call to $image['tmp_name'} succeeds and the remainig two don't. Or am I missing the point here? The problem is I use multiple form input fields to send multiple files. Each time a file is browsed from the local drive it's displayed in a file list on the site through a javascript and it looks like the same input field used to browse the file is empty again. It's stick-man's multifile javascript (http://the-stickman.com/web-development/javascript/updated-upload-multiple-files-with-a-single-file-element/).
  4. Hi everyone, In an attempt to upload multiple files from a HTML form I can't access file['tmp_name'] more than once ?! Here's what I'm trying: [code]foreach($_FILES as $image){ if($image['tmp_name'] != ""){ echo($image['tmp_name']."<BR>"); $uploadPath = '../images/products/'; $smallImage = uploadFile($image["tmp_name"], $uploadPath); $mediumImage = uploadFile($image["tmp_name"], $uploadPath); $largeImage = uploadFile($image["tmp_name"], $uploadPath); } }[/code] I can post the rest of the functions if needed. This only gives me $smallImage on the server, $mediumImage and $largeImage don't exist (empty strings, no filename returned by uploadFile). Does this have anything to do with the time needed to upload the first image? phpversion = 4.3.10 provider = Lycos.nl Thanks in advance for looking at my code attempt. --Rob
×
×
  • 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.