SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Upload, Reading files problem

    In the PHP system I have coded and I have the following problems.

    The System currently creates and uploads JPEG and PDF files into a folders
    under the URL C:\Inetpub\wwwroot\ncigroup\data\invoice\, I read and display the files in the example below:-

    echo "&nbsp<font size='5'color='#FF0000'><a href='$filename' target='_blank'></a>";

    where the files path would be under the URL C:\Inetpub\wwwroot\ncigroup\
    The filename is a contactenation of path "\\Data\\Invoice\\" + filename.pdf;
    The system runs on Windows Server 2003.
    AS we have a lot of invoice files we would like to isolate all PDF and JPEG
    on to a different drive for (security and disk space) on the Server eg:-

    "E:NCIDataStore\\NCIData\\AU\\Invoice\\";
    I cannot read or write any PDF's or JPEG's to the above location.

    Can anybody help or direct me I have tried many options.

    Monty Appavoo

  2. #2
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no wonder
    at least it should be
    E:\NCIDataStore\NCIData\AU\Invoice\
    or, with slashes escaped,
    "E:\\NCIDataStore\\NCIData\\AU\\Invoice\\"

    but it seems you don't understand difference between disk path and www url. andh there may be other troubles of it

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried "E:\\NCIDataStore\\NCIData\\AU\\Invoice\\"
    upon double clicking the *.PDF does not display, however whe view it
    explore it works.

    I agree I do not seem to understand how the difference between path and www.url when using href. Your input would be appreciated.
    Monty Appavoo

  4. #4
    Non-Member
    Join Date
    Oct 2009
    Posts
    1,852
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    there is no E:\NCIDataStore\NCIData\ or even C:\Inetpub\wwwroot\ for the webserver
    In general, webserver have access to the data only below www root.
    However, if you are user of PC, where webserver runs, you can access these files directly
    But other webserver users can't
    So, ther general rule for webservers - all data must be placed under www root

  5. #5
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you very much Shrapnel N5, I now understand.
    Monty Appavoo


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •