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:

echo "<center><a href='C:/Upload_test/$code/$file' target='_blank'>Download Attached File</a></center>";

How do i go about the relative path? Your help is welcome.

Regards

    when you look at the page source is $file and $code the actull var value?

      The error makes sense - "C:/" doesn't name a valid protocol (such as HTTP, HTTPS, FTP, etc.).

      Why are you trying to link to a file on the user's hard drive anyway?

        Write a Reply...