I am developing under wamp.
echo realpath(APPPATH);
C:\wamp\www\salsaritmo\system\application
echo realpath(APPPATH . '..');
C:\wamp\www开发者_运维技巧\salsaritmo\system
echo realpath(APPPATH . '../files'); //(which is the one i want)
returns nothing
realpath() returns FALSE on failure, e.g. if the file does not exist.
Your APPPATH doesn't end with a directory separator, so you're ending up trying to realpath('C:\wamp\www\salsaritmo\system../files'), which obviously isn't valid. Try:
echo realpath(APPPATH . '/../files');
精彩评论