Aronya1
02-14-2004, 03:48 AM
OK, here's my next question. I'm trying to use an <include> statement in a web page. The page I'm coding is one level below the file being called in the <include>:
/home/sitename/public_html/folder/page.php (page being coded)
/home/sitename/public_html/footer.php (the file being called in the <include>)
I can't seem to get the path statement right. I've tried the following:
<? include('footer.php'); ?>
<? include('/footer.php'); ?>
<? include('./footer.php'); ?>
<? include('...footer.php'); ?>
<? include('.../footer.php'); ?>
I'd like to use this shorthand version instead of the full http:\\ path, but I'm missing something.
When I open the page, I get this error: "Warning: main(./footer.php): failed to open stream: No such file or directory in /home/sitename/public_html/folder/page.php"
/home/sitename/public_html/folder/page.php (page being coded)
/home/sitename/public_html/footer.php (the file being called in the <include>)
I can't seem to get the path statement right. I've tried the following:
<? include('footer.php'); ?>
<? include('/footer.php'); ?>
<? include('./footer.php'); ?>
<? include('...footer.php'); ?>
<? include('.../footer.php'); ?>
I'd like to use this shorthand version instead of the full http:\\ path, but I'm missing something.
When I open the page, I get this error: "Warning: main(./footer.php): failed to open stream: No such file or directory in /home/sitename/public_html/folder/page.php"