Results 1 to 2 of 2

Thread: Firefox Mozilla Relative Path

  1. #1
    Join Date
    Dec 2010
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Firefox Mozilla Relative Path

    Hi all,

    i have a script that is suppose to allow download i however get an alert from Firefox Mozilla." Firefox doesn't know how to open this address, because the protocol (c) isn't associated with any program" . Upon further investigation, i got to know that "C:/upload_test/$code/$file" is not a registered protocol and that i need to give a relative path to "C:/upload_test/$code/$file".

    My code is as follows:

    PHP Code:
    echo "<center><a href='C:/Upload_test/$code/$file' target='_blank'>Download Attached File</a></center>"
    How do i go about the relative path?

    Regards

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    change the 'c:\' to 'http://', add your domain (www. optional inbetween) and change the backslashes (\) to forward slashes (/) (assuming 'Upload_test' is at your root).
    Corrections to my coding/thoughts welcome.

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
  •