Hello I am using an MVC architecture for my web application. Now the problem is I have my views in one place and have my images folder in another place. Now I am unable to get my images printed in the right places since, I cannot get my paths right. Even though I give the absolute paths, the images are not getting printed.
images location: /var/www/app_name/web_root/images/1.png
views location: /var/www/app_name/views/controller_name/view1.php
so now in view1.php, I have to add an image and this is how I am trying to link to the image using relative paths.
<td align="left"><a id="nextlink2" href="#"><img src="../../webroot/images/1.png" width="64" height="64" border="0" /></a></td>
This is the path I am using for absolute path, none of them are working.
<td align="left"><a id="nextlink2" href="#"><img src="/var/www/app_name/webroot/images/1.png" width="64" height="64" border="0" /></a></td>
And in both the cases, I am unable to get the image to be displayed. What could the cause be? Any help would be great.
Thank you!