Here's the codes I have tried:
<?PHP
INCLUDE ("./include/nav.inc");
INCLUDE ("./include/news.inc");
INCLUDE ("./include/footer.inc");
?>
and
<?php
INCLUDE ("./include/nav.inc");
PRINT "<HR>" . include("./include/news.inc") . "<HR>";
?>
<hr>
<?PHP
INCLUDE ("./include/footer.inc");
?>
My whole idea was to get a navbar on the left, a footer on the bottom, and a "newspage" that is spit out from my site forum.
The footer and nav include files are just html. The news.inc looks like this:
<?PHP
INCLUDE ("./iB_html/non-cgi/ssi/newsdata.txt");
?>
If I only put the news.inc include in my page, it shows up like a champ. But once I put in the additional code, I get a parse error:
Warning: Failed opening './include/news.inc
' for inclusion (include_path='') in /usr251/home/jctrelfa/public_html/index.php on line 8
The funny thing is, it still prints the <hr> tags I put in, but won't include the news file. (even though it's .txt, it shows as html)
If I try adding a backslash before the quotes (include(\"path/to/file.inc\")), I get this error:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /usr251/home/jctrelfa/public_html/index.php on line 8
Parse error: parse error in /usr251/home/jctrelfa/public_html/index.php on line 8
So, I tried about a zillion combinations of slashes, double-quotes, single-quotes, and tarot cards, but can't get that file to include in any way except by itself.
Pretty weird, huh?
Can someone help me?
Jon