1

I want to display an image on my website.

My website is located in

/var/www/html/mywebsite

The image is located in

/home/user/directory/image.png

I am using codeIgniter and Image src I am passing is same as above. File/directory permissions are proper but still I am unable to display an image.

Vishal Kinjavdekar
  • 291
  • 1
  • 4
  • 13
  • Why dont you put your images in your webserver ? – Ramkee May 14 '16 at 05:08
  • I am using unix file system for each user to view his files/directories.. So every user may have different files – Vishal Kinjavdekar May 14 '16 at 05:21
  • http://stackoverflow.com/questions/5796215/an-url-to-a-windows-shared-folder Is this what you are looking for ? – Ramkee May 14 '16 at 05:32
  • @VishalKinjavdekar make one folder at `/var/www/html/mywebsite` with name `image` store images in that folder and try to retrieve – Pathik Vejani May 14 '16 at 05:33
  • @Ramkee yes I want in the same way but this solution opens an image as a file in a tab. I want to give a path to an image Adding a `file:// ` doesn't work here – Vishal Kinjavdekar May 14 '16 at 05:55
  • Possible duplicate of [Allow users to download files outside webroot](http://stackoverflow.com/questions/3884677/allow-users-to-download-files-outside-webroot) – Dave Ross May 14 '16 at 12:42

0 Answers0