This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Absolute path to images
#1
Absolute path to images
I try show images with absolute path and all time don´t show images, with the same path read directory perfectly with php but don´t show images

My Example:

Quote:<img src="/var/sentora/hostdata/zadmin/public_html/website_com/images/image.jpg" />

I think the path is right, but the only problem is don´t show images, also read perfectly dir and the number of images inside but don´t show image, i disable open_dir_base for read directory in this domain, but how i tell don´t show images with src.

Thank´s in advanced for the help, regards.
Reply
Thanks given by:
#2
RE: Absolute path to images
(04-13-2023, 03:39 AM)franmm25 Wrote: I try show images with absolute path and all time don´t show images, with the same path read directory perfectly with php but don´t show images

My Example:


I think the path is right, but the only problem is don´t show images, also read perfectly dir and the number of images inside but don´t show image, i disable open_dir_base for read directory in this domain, but how i tell don´t show images with src.

Thank´s in advanced for the help, regards.

Websites can not use absolute paths for images or files in that manner.
You would need to do something like this: (recommended)
Code:
<img src="./images/image.jpg" />
or:
Code:
<img src="http://website.com/images/image.jpg" />

Also, if they are on different sites, then you will need to use the php function fopen or curl. Otherwise you will need to use JavaScript.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
only 10 images? Ron-e 3 10 ,710 08-21-2014, 01:10 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)