I'm at a loss as to why I'm having this problem. I'm running IIS on Windows 7 for development but have a Linux server for web hosting.
The problem is whenever I use a PHP system function, like file_exists()
or move_uploaded_file()
, using a path like /support/images/flags/countries/
always fails. The support directory is under the root directory of the site. All the documentation I have read seems to state that the path should work. Is this because I use Windows? Even the posts on SO seem to say it should work.
In order to get it to work correctly I have to use a path like {$_SERVER['DOCUMENT_ROOT']}/support/images/flags/countries
Can anyone explain why my thinking is wrong?