Paths like './assets/images/test.jpg' failing on local
Posted: Wed Sep 16, 2009 1:50 pm
Hi there all.
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:
This works at my work machine, which has the same folder structure (and yes, the file does exist!)
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
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