Jump to content

image path


delickate

Recommended Posts

Images should be accessible via the document root for the domain i.e http://www.xyz.com/images/test.jpg Not stored on some random part of your hard disk on a windows pc. You should be running a webserver like Apache or IIS do define the document root for your website. To get an image to display that it outside of the document root you would either have to copy it into the doc root folder i.e images/ or, as long as it has sufficient permissions use php to display it using the following:

 

<?php
if($image = @fopen('d:\\images\\sani.gif', 'rb')) {
header('Content-Type: image/gif');
fpassthru($image);
}
?>

Link to comment
https://forums.phpfreaks.com/topic/247646-image-path/#findComment-1271976
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.