mailmeakhila has asked for the wisdom of the Perl Monks concerning the following question:
I have a cgi script. When i run it in browser i have to create html files on the fly with the data that is populated. I also need to have links to those files where i can display those html files. I am using the below code but i dont know why html files are not created. Is this a permission issue.
Update: I tried adding die to the open but that didnt help. Also i have removed the Content-Type header.open HTML, ">tmp/$filename"; print HTML "Content-Type: text/html\n\n"; print HTML "<HTML>\n"; print HTML "<head>\n"; print HTML "<title> Second page </title>"; print HTML "<br>"; print HTML "$t->{title}"; print HTML "<br>"; print HTML "$t->{phone}"; print HTML "<br>"; print HTML "</head>"; print HTML "</HTML>"; close HTML;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Create a html page on fly
by GrandFather (Saint) on Mar 17, 2012 at 02:24 UTC | |
by mailmeakhila (Sexton) on Mar 19, 2012 at 15:22 UTC | |
by marto (Cardinal) on Mar 19, 2012 at 15:31 UTC | |
by Anonymous Monk on Mar 19, 2012 at 15:48 UTC | |
by mailmeakhila (Sexton) on Mar 19, 2012 at 16:33 UTC | |
by Anonymous Monk on Mar 19, 2012 at 16:40 UTC | |
by tangent (Parson) on Mar 19, 2012 at 19:03 UTC | |
|
Re: Create a html page on fly
by chromatic (Archbishop) on Mar 16, 2012 at 20:35 UTC | |
|
Re: Create a html page on fly
by JavaFan (Canon) on Mar 16, 2012 at 20:34 UTC | |
by mailmeakhila (Sexton) on Mar 16, 2012 at 22:06 UTC | |
by Anonymous Monk on Mar 16, 2012 at 22:16 UTC | |
by aaron_baugher (Curate) on Mar 17, 2012 at 09:19 UTC | |
|
Re: Create a html page on fly
by tobyink (Canon) on Mar 16, 2012 at 21:07 UTC | |
|
Re: Create a html page on fly
by Riales (Hermit) on Mar 16, 2012 at 20:36 UTC |