Where'd the files go?

Last post 02-04-2010, 4:51 PM by Confuzed. 1 replies.
Sort Posts: Previous Next
  •  02-04-2010, 3:42 PM 58540

    Where'd the files go?

    Okay, I'm not a programmer so I'm not sure how this is all supposed to work.  Ideally I want clients to upload files that are too big for e-mail but not big enough to warrant creating a CD to send us.  We use Network Solutions as our web host provider.  The phpuploader folder is in my files folder which is in the htdocs folder ending up with this URL: http://nemecek-cole.com/files/phpuploader
    I would like the uploaded files to end up in the files folder for me to retreive via FTP after the client is done.
    I can't find any of the uploaded files.  It doesn't seem to be working properly as I've gotten some strange results.
    Sometimes I end up getting this error and sometimes it finishes but no file is listed.
     
     
    Here is my index.php file in  /files :
     
    <?php require_once "phpuploader/include_phpuploader.php" ?>
    <html>
    <body>
    <form id="form1" method="POST">
    <?php
    // Create Uploader object.
    $uploader=new PhpUploader();
    // Set a unique name to Uploader
    $uploader->Name="MyUploader";
    //Step 3: The files will be uploaded to the following folder directly.
    $uploader->AllowedFileExtensions="pdf,zip,7z";
    $uploader->SaveDirectory="files";
    //Step 4: Render Uploader
    $uploader->Render();
    ?>
    </form>
    </body>
    </html>


  •  02-04-2010, 4:51 PM 58542 in reply to 58540

    Re: Where'd the files go?

    Okay, I'm sorta getting it to work with this code but it's not uploading it directly to the  files  folder and it appears that the system temp folder gets cleaned out fast so only the smallest of files get uploaded and moved.
     
     
    <?php require_once "phpuploader/include_phpuploader.php" ?>
    <html>
    <body>
    <form id="form1" method="POST">
    <?php
    // Create Uploader object.
    $uploader=new PhpUploader();
    // Set a unique name to Uploader
    $uploader->Name="MyUploader";
    //Step 3: The files will be uploaded to the following folder directly.
    $uploader->AllowedFileExtensions="pdf,zip,7z";
    $uploader->SaveDirectory="/data/20/1/120/121/1935121/user/2110034/htdocs/files";
    //Step 4: Render Uploader
    $uploader->Render();
    ?>
    </form>
    <?php
    //Gets the GUID of the file based on uploader name
    $fileguid=@$_POST["MyUploader"];
    if($fileguid)
    {
    //get the uploaded file based on GUID
    $mvcfile=$uploader->GetUploadedFile($fileguid);
    if($mvcfile)
    {
    //Gets the name of the file.
    echo($mvcfile->FileName . "<br>");
    //Gets the temp file path.
    echo($mvcfile->FilePath . "<br>");
    //Gets the size of the file.
    echo($mvcfile->FileSize . "<br>");

    //Copys the uploaded file to a new location.
    //$mvcfile->CopyTo("/uploads");
    //Moves the uploaded file to a new location.
    $mvcfile->MoveTo("/data/20/1/120/121/1935121/user/2110034/htdocs/files");
    //Deletes this instance.
    //$mvcfile->Delete();
    }
    }
    ?>

    </body>
    </html>

    Here's my php.ini code:

    file_uploads = on
    upload_max_filesize = 250M
    post_max_size = 300M
    max_input_time = 60
    max_execution_time = 30

     
View as RSS news feed in XML