Two questions

  •  05-08-2010, 2:52 PM

    Two questions

    First of all, really like the script. Best one i found so far.
     
    I used this code (below) to get the filenames, which works well...until i add a:
    $uploader->SaveDirectory="../images/upload";

    Seems it cant find the files if the path is changed...how can I fix this?
     
    Also, is there a way to limit the amount of files?
    Say I only want people to upload 5 files max?
     
    regards,
    P.
     

    $fileguidlist=@$_POST["myuploader"];
    if($fileguidlist)
    {
        $guidlist=explode("/",$fileguidlist);
        
        echo("<div style='font-family:Fixedsys;'>");
        echo("Uploaded ");
        echo(count($guidlist));
        echo(" files:");
        echo("</div>");
        echo("<hr/>");
        
        foreach($guidlist as $fileguid)
        {
            $mvcfile=$uploader->GetUploadedFile($fileguid);
            if($mvcfile)
            {
                echo("<div style='font-family:Fixedsys;border-bottom:dashed 1px gray;padding:6px;'>");
                echo("FileName: ");
                echo($mvcfile->FileName);
                echo("<br/>FileSize: ");
                echo($mvcfile->FileSize." b");
                echo("<br/>FilePath: ");
                echo($mvcfile->FilePath);
                echo("</div>");
    ...
View Complete Thread