Advertisement
hakonhagland

CGI

Jul 17th, 2015
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.39 KB | None | 0 0
  1. use CGI qw( -utf8 );
  2. use CGI::Carp qw(fatalsToBrowser);
  3.  
  4. $cgi=CGI->new();
  5.  
  6. print $cgi->header();
  7.  
  8. $page        = $cgi->param('page');
  9. $root_dir = "/home2/godspla1/public_html/romanian";
  10.  
  11. $root_dir =~ s|/$||; #get rid of trailing slash
  12.  
  13. open (RESULTS, "$root_dir/$page")
  14.   or die "Can't open results page ($root_dir/$page): $!";
  15.  
  16. while ( <RESULTS> ) {
  17.      print;
  18. }
  19. close RESULTS;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement