I have been googling for hours on this problem I'm having, and I can't seem to see anything i'm doing wrong at all.
All the examples seem to match what I'm doing and still I'm getting errors. I'm out of ideas on what to do.
The problem is with inclusion, or rather, require_once.
I have this directory structure with a number of files in it:
[text]
Buddylink (dir)
| buddylinker.administer.subjects_e.inc (file)
-- administration (dir)
-- | SchoolAdminFormCreator.php (file)
-- shared (dir)
-- | visitor.php (file)
-- | Institutions.php (file)
Where '|' means 'in the aforementioned directory'
[/text]
So, the thing is, from the "subjects_e.inc" file i can perfectly include either visitor.php or SchoolAdminFormCreator.php by using
Code: Select all
require_once "administration/SchoolAdminFormCreator.php";
require_once "shared/visitor.php";
Code: Select all
require_once "Institutions.php";
Now, the issue is when I try to include for example 'visitor.php' from the 'SchoolAdminFormCreator.php', i tried this among many other things:
Code: Select all
require_once "../shared/visitor.php";
[text]Fatal error: require_once() [function.require]: Failed opening required '../shared/visitor.php' (include_path='.;C:\php5\pear') in C:\wamp\www\sites\all\modules\buddylinker\administration\SchoolAdminFormCreator.php on line 10[/text]
The same problem arises when I try to include any file at all in a parent directory, from, whichever directory I try it from.
For example - from visitor.php:
Code: Select all
require_once "../buddylinker.administer.subjects_e.inc";
I'm totally clueless now.
Thanks a lot in advance!!
-Tom