Forum Moderators: coopster
I am rebuilding my ASP website to use PHP. I have been pretty successfull so far today (but haven't started any of the database conversion). The one problem I have and cannot understand is that it seems when I include a file that has an include command in it the php code on the second page doesn't get processed, it just dumps all the html onto the page...ex:
file1.php:
...
<?php include("file2.php");?>
...
file2.php:
...
<?php include("file3.php");?>
...
file3.php:
<?php if (something) {?>
this<br>
<?php } else {?>
that
<?php }?>
Then when I run file1.php the include from file3.php shows as:
this
that
not as one or the other. It works fine ran directly or with one include. Any way around this?
<?php if ( $showcat = 1 or!stristr($_SERVER['REQUEST_URI'], 'Daystar') or!stristr($_SERVER['REQUEST_URI'], 'Tech') ) {
echo('<a href="/?showcat=0"><img src="/images/sidecategories2.gif" border=0 alt="Browse Accesories"></a><br>');
} else {
echo('<a href="/?showcat=1"><img src="/images/sidecategories.gif" border=0 alt="Show Categories" width="200" height="45"></a><br>');
}?>
Works with one include, but not with two.