Page 1 of 1

Display images stored in directory one level higher

Posted: Tue Sep 17, 2013 8:17 am
by anu826

Hi,

I want to display an image in directory one level higher that than the current directory. That is if my script is on localhost/www/alk/backend, I want to display an image in localhost/www/alk using image view tag . How can I achieve this?

Anuradha


Re: Display images stored in directory one level higher

Posted: Tue Sep 17, 2013 10:11 am
by mobhar

How about this?

<?php
$myImageFolder = $_SERVER['DOCUMENT_ROOT'] . "/alk";
echo $myImageFolder;
?>