Jump to content
Sign in to follow this  
shadowayex

Uploading Form, what do I need?

Recommended Posts

It didn't change much, besides the delay between scans. But just to make sure I put it in write, here's the scan loop:

    for($i = 1; $i <= $numoffiles; $i++) {        if($_FILES['userfile' . $i]['type'] == 'image/jpeg' ||           $_FILES['userfile' . $i]['type'] == 'image/gif' ||           $_FILES['userfile' . $i]['type'] == 'image/png') {            $file = array('tmpname' => $_FILES['userfile' . $i]['tmp_name'], 'name' => $_FILES['userfile' . $i]['name']);            $file['scan'] = `C:\\Progra~1\\AVG\\AVG8\\avgscanx.exe /heur /arc /scan="C:\\wamp\\tmp\\{$_FILES['userfile' . $i]['tmp_name']}" /trash`;            $file_list[] = $file;        } else {            $results .= mysql_real_escape_string($_FILES['userfile' . $i]['name']) . ' is not a JPEG, GIF, or PNG image.';        }        $string = 'Scan' . $i . '\n';        fwrite($scanlog, $string);        sleep(1);    }

I put it in the right place, right? Do I need to make it sleep longer?

Share this post


Link to post
Share on other sites

You could make it sleep longer if you want, might as well be worth a test just to see if it changes or not. If sleep doesn't have an effect over the scans failing then it's another issue.

Share this post


Link to post
Share on other sites

Well, that didn't work. I know it's completing the second scan, because AVG's scan log says so. That is what's confusing me the most. So somewhere between finishing the scan and loading the next line of code, it decides to hate me >_<. There's got to be something going wrong in there, but I'm not sure why it'd finish the first one fine and the second one not.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...