dagon;10984209 wrote:perhaps you mean run php code in a file named *.html ??
Thanks for the feedback - well as I said; I would like to run the PHP code output to HTML. In the other way to say it, convert the output of PHP code to HTML.
Basically I have this sitemap.HTML and I have another file conversitemap.PHP - And I would like to just output the PHP code to HTML (sitemap)
Here is the snippets:
convertsitemap.php
<?php
function sitemapFunk()
{
global $host, $sqlUser, $sqlPass, $database;
mysql_connect ($host, $sqlUser, $sqlPass) or
die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ($database);
..
..
..
$sitemapHTML .= "<li><a href='artistInfo/entry_".$row['keynum'].".html'>".ucfirst($row['first'])." ".ucfirst($row['second'])."</a></li>\n" ;
}
$html2write .= "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n";
$html2write .= "<html>\n";
$html2write .= "<head>\n";
..
..
..
$html2write .= " <h2>Gallery</h2>\n";
$html2write .= " <UL TYPE=\"circle\">\n";
$html2write .= "$sitemapHTML";
$html2write .= " </UL>\n";
..
..
$html2write .= "</html>\n";
$write = fopen("../sitemap.html","w");
fwrite($write,$html2write);
}
}
?>
And the sitemap.HTML - is just a simple HTML code but I would like it to output the PHP code that I have created in convertsitemap.php.