Kohana3: Absolute path to a file
- by Svish
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.