![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unable to view files in a particular directory under /opt | its.simron | UNIX for Dummies Questions & Answers | 1 | 05-21-2008 10:02 AM |
| Unable to view files in a particular directory under /opt | its.simron | Linux | 1 | 05-21-2008 09:59 AM |
| how to view explorer output in solaris | Renjesh | SUN Solaris | 1 | 03-27-2008 06:14 PM |
| Error: Internal system error: Unable to initialize standard output file | firkus | UNIX for Dummies Questions & Answers | 2 | 10-25-2005 03:23 PM |
| Unable to view contents of a directory | maddave | UNIX for Dummies Questions & Answers | 13 | 10-25-2001 01:50 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
unable to view the output through this cgi
#!/bin/env perl
read(STDIN,$temp,$ENV{'CONTENT_LENGTH'}); @pairs=split(/&/,$temp); $DISPLAY1 = "/u/inarram111/dev/web/HNW/BNY/unsecure-html/myscript2.html"; $DATAFILE1 = "/u/inarram111/dev/web/HNW/BNY/unsecure-cgi-bin/datafile"; open (DATAFILE1, ">$DATAFILE1") || die " Error opening log file AFILE1.\n"; foreach $item(@pairs) { ($key,$content)=split(/=/,$item,2); $content=~tr/+/ /; $content=~s/%(..)/pack("c",hex($1))/ge; $fields{$key}=$content; print DATAFILE1 "$content\n"; } close (DATAFILE1); open (DISPLAY1,">$DISPLAY1") || die " Error opening log file $DISPLAY.\n"; open (DATAFILE1, "<$DATAFILE1") || die " Error opening log file DATAFILE2.\n"; print DISPLAY1 "<HTML>\n"; print DISPLAY1 "<BODY>\n"; print DISPLAY1 "<FORM METHOD=\"POST\" ACTION=\"/cgi/myscript2.cgi\">\n"; print DISPLAY1 "<PRE>\n"; print DISPLAY1 " <b> Typed Message </b>\n"; print DISPLAY1 " <br>\n"; print DISPLAY1 " <TEXTAREA NAME=\"display\" ROWS=\"7\" COLS=\"45\">\n"; foreach $cur_line (<DATAFILE1>) { chomp $cur_line; print DISPLAY1 "$cur_line"; } print DISPLAY1 " </TEXTAREA>\n"; print DISPLAY1 " <b> Type Message </b>\n"; print DISPLAY1 " <br>\n"; print DISPLAY1 " <TEXTAREA NAME=\"display1\" ROWS=\"7\" COLS=\"45\">\n"; print DISPLAY1 " </TEXTAREA>\n"; print DISPLAY1 " <INPUT TYPE=\"submit\" VALUE=\"Send!\"> <INPUT TYPE=\"reset\" value=\" Clear\">\n"; print DISPLAY1 "</PRE>\n"; print DISPLAY1 "</FORM>\n"; print DISPLAY1 "</BODY>\n"; print DISPLAY1 "</HTML>\n"; close (DISPLAY1); open (DISPLAY1,"<$DISPLAY1") || die " Error opening log file $DISPLAY.\n"; @list = <DISPLAY1>; close (DISPLAY1); print "Content-type: text/html\n\n"; print "@list"; the out put is page cannot be displayed.... pls help out.... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|