Menu

#13 IE Bug - filename = path and filename

open
nobody
None
5
2005-02-10
2005-02-10
No

IE makes filename = path and filename
example: C:\\Documents and
Settings\\scott.YOURHOST\\Desktop\\yh client
logos\\avalon-wine.jpg

Discussion

  • Scott Norman

    Scott Norman - 2005-02-11

    Logged In: YES
    user_id=958188

    // IE 6.0 File Name Fix
    // IE 6.0 File Names get upload as
    C:\\directory\\...\\filename, so get
    //get the actual file name and not file name and directory
    // Scott Norman, scott@yourhost.com
    if (strpos($_SERVER["HTTP_USER_AGENT"],"MSIE 6.0")){
    $TempFileName = explode("\\",$file['name'][$i]);
    $FileName = $TempFileName[count($TempFileName)-1];
    }
    else {
    $FileName = $file['name'][$i];
    }

    echo '<td align="left">' . $FileName . "</td>\n";
    //echo '<td align="left">' . $file['name'][$i] ."</td>\n";
    echo '<td align="right">' . $file['size'][$i] ."</td></tr>\n";

    rename($file['tmp_name'][$i],
    '/usr/sites/yourhost.com/www/megaupload/'. $FileName);

     
  • Neovalis

    Neovalis - 2005-10-29

    Logged In: YES
    user_id=867367

    Awesome... that worked like a charm.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.