Web Analytics Made Easy -
StatCounter Attachment Paths - CodingForum


No announcement yet.

Attachment Paths

  • Filter
  • Time
  • Show
Clear All
new posts

  • Attachment Paths

    I have a browser form in which items can be checked off for receipt by email. They may be images, PDFs or other file types. When submitted to the cgi app on the server I seem to have it all working with one exception. I can't figure out how to specify the path for the selected files.

    I'm using $files = array("fileone.ext","filetwo.ext")

    My database is running via cgi.bin so the challenge (for me) is how to insert the path to the files which are in the sub-directories of the root. I know their locations, it's the format in my PHP array that eludes me.

    Would it be array("/images/fileone.ext","/docs/filetwo.ext") ?

  • #2
    $_SERVER['DOCUMENT_ROOT'] contains the path on the server to the web root for your site.

    So if the files are web accessible then this would work as a path:


    • #3
      Thanks, that's what I needed.