in reply to Re: Problem linking a file in CGI script
in thread Problem linking a file in CGI script

Hi,

Firstly, thanks for taking time to reply.

I tried changing the security settings in my browser but still i am not able to open the file. Also, changing the setting will not be a feasible solution as this program will be used by many people.

Is there any other workarounds to display the files in a directory as well as provide a link to them?

  • Comment on Re^2: Problem linking a file in CGI script

Replies are listed 'Best First'.
Re^3: Problem linking a file in CGI script
by Corion (Patriarch) on Oct 29, 2009 at 17:17 UTC

    I'm not sure what you're actually trying to do. file:// URLs will only work on your local machine, nowhere else. Maybe if you explain what you're trying to do we can come up with a way to solve your actual problem.

    And for your reference, for example for FireFox, firefox open local file:// url points out the Mozilla Knowledge Base on this topic.

      Hi,

      The scenario is, i am developing a web space wherein users can upload their files to my server and can view them whenever required.

      I succeeded in accomplishing the upload task and i am able to list the files in the directory. But i am not able to add the feature of providing links to the files.

      Does this mean i will not be able to provide the link feature at all?

        Then, file:// will not work anyway, because file:// urls only work locally. Most likely you will want to use <a href=".../$filename">$filename</a> style links and serve the files to your users through your webserver.