|
-
Oct 25th, 2007, 03:14 AM
#1
Thread Starter
Frenzied Member
including files.....how to make it work on all levels
I am setting up a new website, that will run on a Win2K3 Server (some other system on the server need windows), so I will be using WAMP.
Not a php pro (yet), but from what I gathered one can set a specific folder to be your "includes" folder, so in any php page you can just say "include("myfile.php") and it does not matter in what directory you are, myfile.php will be included as long it exists.
Am I right, and if so, how do i do this?
Reason for this is that say I create a header for all pages in mysite/include/header.php. In header.php I include another file (say mysite/lang/en.inc). But now header.php cannot be re-used, if it's in a different directory level. (say i use it in a file, two levels deeper it will crash, because ../lang/incshould now be ../../../lang.php)
I'm fairly sure I just missed sth simple so far...this sounds like everyone should address this "issue"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|