Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: Perl cgi script for directory listing and file downloading!! Problem: Unable to download the file

by Corion (Patriarch)
on Nov 05, 2014 at 11:52 UTC ( [id://1106186]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Perl cgi script for directory listing and file downloading!! Problem: Unable to download the file
in thread Perl cgi script for directory listing and file downloading!! Problem: Unable to download the file

This is a browser configuration issue.

I guess that, for example, /www/download might be a good place for your files.

You need to learn about how your webserver maps URLs to files and appropriately configure the webserver. First get the URL download working without your script by going directly to the URL with your browser. Then you can generate the URLs from your script.

Replies are listed 'Best First'.
Re^4: Perl cgi script for directory listing and file downloading!! Problem: Unable to download the file
by masood91 (Novice) on Nov 05, 2014 at 12:08 UTC
    ok, but what will be the path for opendir, will it be my $dir='/www/Documents' or will it be $dir='C:/wamp/www/Documents ...? What is the default directory if i dont give any path?

      There is no default. You should always give an absolute path.

        Ok, I have successfuly opened a file in browser directly using this URL: http://localhost:8080/Documents/dbschema.pdf now in script, should i use this? opendir(DIR,'http://localhost:8080/Documents/')

        ?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1106186]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-29 01:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found