showing images outside webroot

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 34
Joined: Fri Feb 27, 2004 5:57 am

Thu Mar 11, 2004 7:30 am

To keep the pictures in place you have to make a webshare to your picture directory. It depends on what kind of server your using what the procedure is to make a webshare working :)

Your url will then looks like this: http://<yoursiteUrl>/<webshare>

If you can't get it to work, post your type of server your using!
Practise bares art or something...... 8)

User avatar
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Tue Mar 16, 2004 1:54 am

Your solution would be a little tricky to understand.

You will need to use php to read the file and output as data.

i.e. your img tag would look something like this.

<img src="output.php?file=file.jpg" alt="file.jpg" />

basically the output.php will display the file.jpg

User avatar
Posts: 2257
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back

Tue Mar 16, 2004 8:33 am

Assuming you're using Apache, mod_alias is probably what you're looking for.

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest