Results 1 to 1 of 1

Thread: output array

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default output array

    Can anyone see what's wrong with my $s_list/$f_list variables? I want to hold all of the file names in $s_list if they successfully uploaded or $f_list if they didn't. Currently all the files are uploading but the names are not displaying.

    The full output of this is:
    3 files uploaded successfully.
    Array ( [0] => Array
    [1] => ArrayArray
    [2] => ArrayArray
    )
    PHP Code:
    $allfiles $_POST['incriment'];
    $uploaddir $_COOKIE['ID'] . "/";
    if (
    file_exists($_COOKIE['ID'])===true) {
    //Directory is already created being upload process
    for ($a=0$a $allfiles$a++) {
       if(
    $_FILES['file']['name'][$a]) {
        
    $uploadfile $uploaddir basename($_FILES['file']['name'][$a]);
        
    $ext strtolower(substr($uploadfile,strlen($uploadfile)-3,3));   
        if (
    move_uploaded_file($_FILES['file']['tmp_name'][$a], $uploadfile))
         {
          
    $success++;
          
    $s_list[$a] = $s_list $_FILES["file"] . "<br />"
         }
         else
         {
         
    $fail++;
         
    $f_list $f_list $_FILES['file'] . "<br />"
         }
       }
      }
      if (isset(
    $success)) {
    echo 
    "$success files uploaded successfully.<br />";
        
    print_r($s_list);
    }
       if (isset(
    $fail)) {
      echo 
    "$fail files failed to upload."
       
    print_r($f_list);

    If anyone also sees why this chokes out Safari but not Firefox that'd be very helpful also. Thanks.
    Last edited by bluewalrus; 10-21-2009 at 04:13 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •