开发者

Realpath not working with ../files?

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');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜