Kohana3: Absolute path to a file
Posted
by Svish
on Stack Overflow
See other posts from Stack Overflow
or by Svish
Published on 2010-03-12T11:23:07Z
Indexed on
2010/03/12
12:57 UTC
Read the original article
Hit count: 385
Say I have a file in my kohana 3 website called assets/somefile.jpg
. I can get the url to that file by doing
echo Url::site('assets/somefile.jpg'); // /kohana/assets/somefile.jpg
Is there a way I can get the absolute path to that file? Like if I want to fopen
it or get the size of the file or something like that.
In other words, I would like to get something like /var/www/kohana/assets/somefile.jpg
or W:\www\kohana\assets\somefile.jpg
or whatever is the absolute path.
© Stack Overflow or respective owner