PHP/Perl/CGI Question
| From: | Clayton Dukes | Date: | Tue, 20 Mar 2001 19:21:31 +0000 |
| Subject: | PHP/Perl/CGI Question | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-44805@lists.php.net to get a copy of this message | ||
Howdy,
I have a search cgi form that has the following function:
sub header
{
print "Content-type: text/html\n\n";
print "<?php include(\"mainfile.php\")\;?>\n";
print "<?php include(\"header.php\")\;?>\n";
print "<title>Search</title>\n";
}
When I use the function though, the web page (source) comes up as:
<?php include("mainfile.php");?>
<?php include("header.php");?>
<title>Search</title>
...data
<?
include("footer.php");
?>
What am I doing wrong? Why is it printing the php tags instead of executing them?
Clayton Dukes
---------------------------------------------------------------------
Download Free Essays, Term Papers and Cisco Training from http://www.gdd.net