This is a longshot but I have a file with something like this:
document structure: /some/path/start.php
<?php
require_once '../../another/path/test.php';
?>
and
/another/path/test.php /another/path/images/
<?php
test.php
hello<img src='images/1.jpg'>
?>
I'm looking for a way for the required file (test.php) to correctly load the images (essentially reset what it believes to be the currrent directory). I don't want to force people to use absolue paths and really don't want to add some variable in there. Is there a php construct to handle this? I'm using Zend_Framework. Maybe the reverse, a construct to have multiple index.php files that map via absolute paths to my starter script for Zend Framework.
Any ideas would be appreciated? I have the following there's an elegant sol'n - I'm just not seeing it.