Hi,
I am using the following script:
<?php
$template = join( "", file("template.incl"));
$article .= ".html";
$article_file = join( "", file($article));
$copyright = join( "", file("http://www.theglide.com/copyright.html"));
$menu = join( "", file("http://www.theglide.com/mainmenu.html"));
$template = str_replace("%article%", $article_file, $template);
$template = str_replace("%copyright%", $copyright, $template);
$template = str_replace("%menu%", $menu, $template);
print "$template";
?>
This script is used to import a template and several html files. In the template file the %menu%,%copyright% and %article% are replaced with respective HTML file to finally produce a complete HTML page.
My problem is the following...
When the script comes to the part when it wan't to include the menu file, I get an error. The file exists so I know that isn't the problem.
try the file script at http://test.theglide.com/test.php?article=lancer
Question 2, is there any other way of doing this script?
thanks
Michael
I am using the following script:
<?php
$template = join( "", file("template.incl"));
$article .= ".html";
$article_file = join( "", file($article));
$copyright = join( "", file("http://www.theglide.com/copyright.html"));
$menu = join( "", file("http://www.theglide.com/mainmenu.html"));
$template = str_replace("%article%", $article_file, $template);
$template = str_replace("%copyright%", $copyright, $template);
$template = str_replace("%menu%", $menu, $template);
print "$template";
?>
This script is used to import a template and several html files. In the template file the %menu%,%copyright% and %article% are replaced with respective HTML file to finally produce a complete HTML page.
My problem is the following...
When the script comes to the part when it wan't to include the menu file, I get an error. The file exists so I know that isn't the problem.
try the file script at http://test.theglide.com/test.php?article=lancer
Question 2, is there any other way of doing this script?
thanks
Michael