note 93767 rejected from function.include by danbrown
| From: | danbrown@php.net | Date: | Sun, 27 Sep 2009 16:25:32 +0000 |
| Subject: | note 93767 rejected from function.include by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-161112@lists.php.net to get a copy of this message | ||
Note Submitter: correohs at hotmail dot com
----
Help needed.
I have 3 domains pointing directory in my webserver (ISP)
mysite.com
mysite.net
mysite.info
I wanted to use one menu for all of them
mywebsite structure
/index.php ( I use include $_SERVER['DOCUMENT_ROOT']."/include/menu.html"; )
/about.php ( I use include $_SERVER['DOCUMENT_ROOT']."/include/menu.html"; )
/contactus.php ( I use include $_SERVER['DOCUMENT_ROOT']."/include/menu.html"; )
/(more files) ( I use include $_SERVER['DOCUMENT_ROOT']."/include/menu.html"; )
/link/
/link/index.php ( I use include $_SERVER['DOCUMENT_ROOT']."/include/menu.html";
)
/link/(more php files) ( I use include
$_SERVER['DOCUMENT_ROOT']."/include/menu.html"; )
/include
/include/menu.html
Menu File Structure
<li><a href="aboutus.php">ABOUT</a>
<ul><li><a href="aboutus.php">ABOUT US</a></li>
<li><a href="contactus.php">CONTACT US</a></li>
<li><a href="testimonial.html">GUEST BOOK</a></li>
</ul>
</li>
include $_SERVER['DOCUMENT_ROOT']."/include/menu.html";
Pages on root directory are working well.
/aboutus.php
/contactus.php
/testimonial.html
when I'm on /link directory (subfolder )I got problems
the menu will point to.
/link/aboutus.php
/link/contactus.php
/link/testimonial.html
Getting page no found.
if I'm in a subfolder, how can I do to call the include file, and preserver the root path
automatically.
---
.com .net .info
/
/index.php
/about.php
/contactus.php
/testimonial.html
/(more files)
/link/
/link/index.php
/link/(more php files)
/include/menu.html
---
Thanks!
CorreoHS