468,167 Members | 1,951 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,167 developers. It's quick & easy.

Problems with images -- newbee

Hi !
Let's say that this is the folder on the server:
/web/firstDir/secondDir/images/image.gif
where i have stored my pictures. I have tryed with apsolute and relative
paths but i can't display images....

If i right click on the image the whole path is displayed on this way:
http://www.test.com/Dir1/Dir2/Dir3/w...ages/image.gif

Should i define global variables(?) or how to solve this....

thanx in advance

Jul 17 '05 #1
3 1566
On Sat, 12 Feb 2005 15:57:09 +0100, "Newbee" <ph***@gtxmail.com> wrote:
Let's say that this is the folder on the server:
/web/firstDir/secondDir/images/image.gif
where i have stored my pictures. I have tryed with apsolute and relative
paths but i can't display images....

If i right click on the image the whole path is displayed on this way:
http://www.test.com/Dir1/Dir2/Dir3/w...ages/image.gif

Should i define global variables(?) or how to solve this....


Looks like you're probably missing a leading slash, or doing something else
wrong, hard to tell without some code.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
Looks like you're probably missing a leading slash, or doing something else
wrong, hard to tell without some code.
****

This is the code part for the image ( this is document_root version):
<?php
print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
"/web/firstDir/secondDir/images/image.gif" );
?>

but i have tryed with

<?php
print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
"/firstDir/secondDir/images/image.gif" );
?>

but with no success...
Jul 17 '05 #3
Newbee wrote:

Looks like you're probably missing a leading slash, or doing something else
wrong, hard to tell without some code.
****

This is the code part for the image ( this is document_root version):
<?php
print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
"/web/firstDir/secondDir/images/image.gif" );
?>

but i have tryed with

<?php
print("<img src='" . $_SERVER['DOCUMENT_ROOT'] .
"/firstDir/secondDir/images/image.gif" );
?>

but with no success...


An img tag is already relative to the document root. Don't add it
again.

--

To reply, delete the 'x' from my email
Jerry Stuckle,
JDS Computer Training Corp.
js*******@attglobal.net
Member of Independent Computer Consultants Association - www.icca.org
Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Newbee Adam | last post: by
3 posts views Thread by Scott | last post: by
3 posts views Thread by John Tacke | last post: by
2 posts views Thread by BluDog | last post: by
1 post views Thread by baroque Chou | last post: by
1 post views Thread by gcdp | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.