Probably not at the OS level. If I where to look anywhere, it would be either the Apache or PHP config files.
Personaly I think this is a bad idea though. If you start editing Apache or PHP to fix your programming errors, you will no longer be able to load your software on any other system without going in and making changes to a service.
In addition to that, it could make things even worse. If you attempt to load a correctly coded file, it could interpret "images/img.gif" as though its in the same directory.
Chances are your barking up the wrong tree and i'd be best if you just corrected your code.
Just my 2cents.
CSevey