PHP Scripts Development » PHP Classes Support Forum

upload_demo.php

(9 posts)

Great offers not only for geeks!


  1. User has not uploaded an avatar

    gtrava01
    Member

    I just tried upload_demo.php in the easy upload distribution. Uploading works, but subsequent downloads don't seem to do anything.
    Is the php syntax correct in select_files function?
    When I run the downloaded demo, I get the following output:

    <form name="form1" method="post" action="/software/index.php">
    <select name="file_in_folder">
    <option value="" selected>...
    <option value="Azprin_Pty_Ltd.pdf">Azprin_Pty_Ltd.pdf
    <option value="IOCOM_New_Quick_Reference.pdf">IOCOM_New_Quick_Reference.pdf
    <option value="insors_guide_to_access_grid_compatability.pdf">insors_guide_to_access_grid_co...
    <option value="maintenance_policy.pdf">maintenance_policy.pdf
    </select><input type="submit" name="download" value="Download"></form>

    doesn't look right.

    Posted 4 months ago #
  2. Hi,

    you need to use some code in the script: /software/index.php

    use the "universal downloader" script from my website

    Posted 4 months ago #
  3. User has not uploaded an avatar

    gtrava01
    Member

    Hi Olaf,

    The code seems to be already in the upload_demo.php file (within the isset($download)).

    Posted 4 months ago #
  4. ok, do you get any error message?

    Posted 4 months ago #
  5. User has not uploaded an avatar

    gtrava01
    Member

    No errors whatsoever. IE shows its downloading something, as the download progress bar moves.
    Checked php error logs etc etc, no errors.

    Posted 4 months ago #
  6. I guess you need to enable error reporting and the path to the files is not ok...

    Posted 4 months ago #
  7. User has not uploaded an avatar

    gtrava01
    Member

    Error reporting was on, and the path looks ok.
    Looks to me like $download is not set.

    I must have missed something here in the code.
    It appears to be downloading.

    This demo self contained or does it need extra snippets for download to work?

    Cheers.

    Posted 4 months ago #
  8. remove the first row:

    require($_SERVER['DOCUMENT_ROOT']."/includes/header.php");

    replace $download with $_POST['download']

    Posted 4 months ago #
  9. ... just validated the demo, download the class again to have the right file.

    Posted 4 months ago #

RSS feed for this topic

Reply

You must log in to post.