0

We have folder outside of our WAMP server that we need to access the stored images/photos on local "C:\ourjobs\photos" within PHP code. I know this is a security concern for browsers but is there a work around for this problem?

The links appears to work fine but access to the local drive is restricted..

Any ideas or suggestions are welcome.

<td colspan="2" rowspan="8"><IMG SRC="<?php echo $data['JOB_PHOTO1'];?> WIDTH=32 HEIGHT=32>"</td>
<td colspan="3" rowspan="8"><IMG SRC="<?php echo $data['JOB_PHOTO2'];?>WIDTH=32 HEIGHT=32>"</td>

Not allowed to load

Adam M
  • 109
  • 1
  • 7
  • 1
    You should probably set up an ALIAS, so that you can access the contents of that directory via an URL path under the actual domain of the project. https://stackoverflow.com/questions/15770778/configure-apache-conf-for-alias – 04FS Feb 20 '19 at 11:52
  • Add quotes to your `src` attributes and maybe add a space here? `?>WIDTH=32` – brombeer Feb 20 '19 at 12:06
  • sorry kerbholz, the source did include quotes.. I failed to post the updated source but have updated the question to contain them now. Hopefully that's still not an issue – Adam M Feb 20 '19 at 13:15
  • The ALIAS appears to be the most viable option at the moment.. I'm still getting a 403 error - You don't have permission to access /img/SNAG-0063.jpg on this server. Does anyone know what permissions need to be set on a Windows system to allow access to a folder/file?? – Adam M Feb 20 '19 at 16:26

1 Answers1

0

Use an absolute URL, like this:

src=http://www.example.com/image.gif""
rpm192
  • 2,630
  • 3
  • 20
  • 38