I'm integrating phpThumb (a thumbnailing script) with CodeIgniter framework. Both scripts are quite fussy about paths/URLs (in the sense that they're not structured 'physically' through CI, but re-routed).
Anyway, I've been doing some development on my work machine using functions like:
Code: Select all
if(file_exists('./assets/images/test.jpg')) { echo 'exists'; } else { echo 'not found'; }
If I replace the path with the absolute one (eg '../../../assets' etc) it works, but this isn't practical and given CodeIgniter's dynamic URLs, I can't always predict how many levels deep the ../s need to be.
Can anyone think of some php configuration issue that could be causing this? It's driving me mad trying to get these root paths working!
Matt