Include path with ./ in PHP
Posted on 2009-04-06
If I have an index.php in say:
that is calling an include() in a sub directory say:
include_once('subfolder\file.php') which translates into c:\wamp\www\myfolder\subfolder\file.php
and inside file.php it is calling an include like:
then it goes back to c:\wamp\www\myfolder\ to try and find it . How can I force it so that include('./anything.php') stays inside the most recent folder it was called from, and not the first?
NOTE: It's important to know that I can't edit file.php, It has to maintain it's include with the ./