require_once in php
Posted
by Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2010-04-16T11:18:44Z
Indexed on
2010/04/16
11:23 UTC
Read the original article
Hit count: 314
I have a php file which has a require_once Statement (?) this file is then in included in 2 other php files, one php file is in a sub directory so the layout is like this ("file1" and "file2" include the file "included" which require_onces the "required")#
L--subfolder1
| L--file1
L--subfolder2
| L--required
L--file2
L--included
How can I reference the "required" file from the "included" file so that it will work from both file1 and file2?
© Stack Overflow or respective owner