473,395 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Re: <img> can't seem to find the file

Puzzled wrote:
echo '<img src="/usr/local/yaddayadda/filename.jpg" alt="not
found">' ;
I hope I'll understand it in the right way.
You browse your website http://www.example.com with a webbrowser. In the
source of it is written by PHP
<img src="/usr/local/yaddayadda/filename.jpg" alt="not found">

So your brwoser is asking the webserver for
http://www.example.com/usr/local/yad...a/filename.jpg

But I think it will be not the correct path because it seems to be a
complete unix-path starting from root. PHP will not deliver the picture it
self but only the relative path to it. (or relative path according to your
web root)
Sven Reuter
--
http://www.sReuter.net/
http://www.Auskennbert.de/
Nov 6 '08 #1
2 1766
Sven Reuter wrote:
But I think it will be not the correct path because it seems to be a
complete unix-path starting from root. PHP will not deliver the picture
it self but only the relative path to it. (or relative path according to
your web root)
=(or absolute path according to your web root)

Sorry.
Sven Reuter
--
http://www.sReuter.net/
http://www.Auskennbert.de/
Nov 6 '08 #2
Puzzled <sc*************@example.comwrote:
On Thu, 06 Nov 2008 21:36:16 +0100,
"Sven Reuter" <ne*************@sreuter.netwrote:
>>Puzzled wrote:
>>echo '<img src="/usr/local/yaddayadda/filename.jpg" alt="not
found">' ;
I hope I'll understand it in the right way.
You browse your website http://www.example.com with a webbrowser. In the
source of it is written by PHP
<img src="/usr/local/yaddayadda/filename.jpg" alt="not found">

So your brwoser is asking the webserver for
http://www.example.com/usr/local/yad...a/filename.jpg

But I think it will be not the correct path because it seems to be a
complete unix-path starting from root. PHP will not deliver the picture it
self but only the relative path to it. (or relative path according to your
web root)
Sven Reuter

Tak så mycket! (Or recht schön Dank, depending on whether you're
ethnically big-endian or little-endian :-)

I got confused because Apache will accept absolute paths for
config instructions etc.
Apache will accept absolute paths for just about anything IF you've
configured it that way.

The normal default is to not serve pages/images not under the root.
--
Jim Pennino

Remove .spam.sux to reply.
Nov 6 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Philipp Lenssen | last post by:
My friend has the following problem (background: we want to transform XML to XHTML via XSLT): "We copy XHTML fragments into an output by using the following template: <xsl:template match="*"...
9
by: Wladimir Borsov | last post by:
As well known for <IMG ...> tags in web pages a width and a height attribute can be applied. What I want to do now is to fix the width for ALL the images on my web page to exactly lets say 70 pixel...
7
by: Zhang Weiwu | last post by:
Hello. This is problem puzzled me a long time. I wish to organize some block elements and let them flow one after each other like text. Think about a album, I wish the album have 12 thumbnails,...
15
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width:...
3
by: Henry Johnson | last post by:
Okay - I'm spinning my wheels on this one... can someone help me figure out how to programmatically populate a table cell as follows (from C# code-behind)? I've tried using a Literal control in the...
1
by: Carl | last post by:
Hi all I have a javascript function that drags and drops an element (ie img) into a container (ie bordered div). The function works and returns the element and and container. My next step is to...
4
by: SammyBar | last post by:
Hi all, I wonder is it possible to upload the content of an <imgfield to a server. The content of the <imgwas downloaded from a web site different from the one it should be uploaded. The image...
4
by: Jon Slaughter | last post by:
I have a captcha system going and for some reason when I use <?php $s = ""; for($i = 0; $i < 10; $i++) { $s = $s.rand(0,9); } $_SESSION = $s; $fn = '/Login/Register/Captcha.php'; echo '<img...
2
by: Bobby Edward | last post by:
I have a subdirectory with an aspx page that references a master file located in the root. In the master file template I reference a logo/image that is in <root>/resources... <img alt="logo"...
0
by: jimp | last post by:
Puzzled <scratching.head@example.comwrote: Look in the web server log file for errors. Does the web server have permission to that directory? -- Jim Pennino
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.