in reply to How to display output in separate html form in cgi script
If you're going the Perl CGI route, consider using the CGI module (sorry, chromatic).
If I understand your question correctly, you want a separate CGI script and a resulting html document. That is, instead of a dynamically-created html document, you'd like a static html document created by the script.
This can certainly be done, by writing the results to an html file, and then redirecting the browser to that file. You'd need write permissions for both the dir and file you're writing to. But now it gets a little messy...
You'd need to create a unique filename for each response--for each new htnl document that the CGI script creates. Additionally, you'd need to figure a way to deal with all the html files that your CGI script is creating. Do you leave them in the directory? If you're going to delete them, how long after they're created and how often?
You need to answer for yourself whether creating static html files from a CGI script is better than creating the pages 'on the fly,' as your script above does.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to display output in separate html form in cgi script
by manmanda (Initiate) on Jan 24, 2014 at 05:38 UTC | |
by NetWallah (Canon) on Jan 24, 2014 at 05:53 UTC | |
by Anonymous Monk on Jan 24, 2014 at 07:10 UTC |