The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



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

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-17-2005
rishchand rishchand is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 3
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....
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:47 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0