Forum Moderators: phranque
The site uses .shtml SSI pages with cgi scripts and php code as includes. I just recently ran accross a problem where the addition of a second php include does not execute on the development server.
Here is test.shtml
<html>
<head></head>
<body>
<!--#include virtual="/stuff1.php"-->
<!--#include virtual="/stuff2.php"-->
</body)
</html>
Here is stuff1.php
<?php
echo "Hello world from stuff1.php\n";
?>
Here is stuff2.php
<?php
echo "Hello world from stuff2.php\n";
?>
Here is the output of test.shtml on the browser
Hello world from stuff1.php
Here is the html output of test.shtml
<html>
<head></head>
<body>
Hello world from stuff1.php
<?php
echo "Hello world from stuff2.php\n";
?>
</body)
</html>
I can't seem to find the cause of this problem. Any Ideas out there?
Thanks,
That's odd...
The only thing I see wrong is that you're missing a space before the closing "-->" in each line. The correct format is "<!--#directive -->" with no space ahead of the directive, and one space after it. But that's such a common error, that I doubt it would cause problems.
Have you tried reversing the order to call stuff2.php first, and if so, what happens?
Jim
it is a known bug though I can find anything newer than 2004 that gives reference that it is fixed