By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,703 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,703 IT Pros & Developers. It's quick & easy.

Problems with images -- newbee

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.