Support forums
in

Uploading to root directory - Not within phpfileuploader directory

Last post 07-03-2013, 12:19 PM by Kenneth. 5 replies.
Sort Posts: Previous Next
  •  06-24-2013, 9:35 AM 77599

    Uploading to root directory - Not within phpfileuploader directory

    Hi,

     

    I have the PHP file uploader installed to domain.com/upload

     

    I have password protected this directory to prevent any unauthorised use of the script.

    I would like to upload my files to domain.com/pdf - so the public can download them without having to login.

     

    The obvious option was to change this line to;  

    //Where'd the files go?
    $uploader->SaveDirectory="/pdf";

     

    With the forward slash in front, this doesnt work. The site is only hosted on a basic shared hosting plan, nothing complicated, the files are located within public_html/ - I alaso tried /public_html/pdf

    I just get a Invalid save directory error....

     

    Any advice would be great?

     

    Thanks,

     

  •  06-28-2013, 12:29 PM 77627 in reply to 77599

    Re: Uploading to root directory - Not within phpfileuploader directory

    Hi fozzydj,

     

    If the folder pdf under your site root, please try the code below.

     

    $uploader->SaveDirectory="pdf";

     

    Regards,

     

    Ken 

  •  07-01-2013, 3:40 PM 77637 in reply to 77627

    Re: Uploading to root directory - Not within phpfileuploader directory

    Hi Ken,

     

    No, phpfileuploader is installed to;

     

    domain.com/upload/

     

    The upload directory is password protected to stop missuse of the script.

     

    I need to upload to domain.com/pdf <- Which isnt password protected, so anyone can access the PDF's we are uploading/

     

    Does that make sense?

     

    Regards,

     

    Neal 

  •  07-02-2013, 12:10 PM 77640 in reply to 77637

    Re: Uploading to root directory - Not within phpfileuploader directory

    Hi,

     

     

    If the pdf folder under domain.com/pdf, that means it is under your site root, try the setting I sent, it should work.

     

    Regards,

     

    Ken 

  •  07-02-2013, 2:17 PM 77641 in reply to 77640

    Re: Uploading to root directory - Not within phpfileuploader directory

    Hi Kenneth,

     

    Itdidntworki'mafraid,Iget ;

     

    Invalid SaveDirectory ! not exists.

     

    It looks for domain.com/upload/pdf - not domain.com/pdf

     

    I need to the look back to the root directory, the script is installed in a sub directory called /upload

     

    Regards,

     

    fozzydj 

  •  07-03-2013, 12:19 PM 77645 in reply to 77641

    Re: Uploading to root directory - Not within phpfileuploader directory

    Hi fozzydj,

     

    If the uploader page under the upload folder too, then try

     

    $uploader->SaveDirectory="../pdf";

     

    Regards,

     

    Ken 

View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems