Check out the CGI module at search.cpan.org.
There's an example about how to use the header() function to bring up a dialogue
box to download the generated content as a file. In the example it's using a gif
But the principles will apply to your file as well. Give that a read and a try.
Dan M
>
Part two of Dan's question is how to specify a file name for dynamic
content so that the name of the script that generated the content won't be
used as the default. The following worked for me in IE 6.0, Netscape 6.2
and Opera 7.0:
print "Content-type: text/plain\n";
print "Content-Disposition:
dan wrote:
> basically, what it does, is it reads info, and supposed to output so
> the user can download the data it's just output, webserver does
> support scripts, it outputs
> the correct data, but my goal is to be able to get the "download file"
> window up, and be able to store a "servers.ini
dan wrote:
> basically, what it does, is it reads info, and supposed to output so the
> user can download the data it's just output, webserver does support scripts,
> it outputs
> the correct data, but my goal is to be able to get the "download file"
> window up, and be able to store a "servers.in
dan wrote:
> I'm making a script that enables you to download content off a server as it
> is, so the data is as up to date as it could ever possibly be. I have this:
>
> however, if I click on the link on the web page which executes the
> download.pl script, it appears either a) in the web browse
Dan wrote:
>
> so, i click on a link which goes to download.pl, and instead of the data
> the script outputs going to the browser, i want it to be saved as a file,
> servers.ini, as if you've right-clicked the link and put "save target
> as...". at the moment, doing "save target as..." says the f
ok, lemme go from the top.
i have a script (below) which runs through directories retrieving necessary
content, and, when the script is executed, it outputs it to browser. what i
want it to do, but can't get it to do, is, to be able to click on a link
which links to the script, but the user be abl
So you're trying to figure out /can't get it to what???
Read this :: http://www.catb.org/~esr/faqs/smart-questions.html
> basically, what it does, is it reads info, and supposed to
> output so the user can download the data it's just output,
> webserver does support scripts, it outputs the corr
basically, what it does, is it reads info, and supposed to output so the
user can download the data it's just output, webserver does support scripts,
it outputs
the correct data, but my goal is to be able to get the "download file"
window up, and be able to store a "servers.ini" file from the data
Not really sure what you're problem/goal is but if the script's code shows up in the
browser or it wants to download the script, Then your webserver doesn't do .pl
extensions. Try .cgi as the extension.
Also make sure it's executable.
If it a problem writing files try :
File::Slurp
If you're t
10 matches
Mail list logo