showing images outside webroot

images php coding issues or problems here.

Moderators: macek, egami, gesf

User avatar
Enquea
New php-forum User
New php-forum User
Posts: 34
Joined: Fri Feb 27, 2004 5:57 am
Contact:

Postby Enquea » 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!

User avatar
Redcircle
Moderator
Moderator
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA
Contact:

Postby Redcircle » 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
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Tue Mar 16, 2004 8:33 am

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


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest

cron