Connecting Tech Pros Worldwide Help | Site Map

Problems with images -- newbee

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 11:28 AM
Newbee
Guest
 
Posts: n/a
Default 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




  #2  
Old July 17th, 2005, 11:28 AM
Andy Hassall
Guest
 
Posts: n/a
Default Re: Problems with images -- newbee

On Sat, 12 Feb 2005 15:57:09 +0100, "Newbee" <phpAK@gtxmail.com> wrote:
[color=blue]
>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....[/color]

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

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
  #3  
Old July 17th, 2005, 11:30 AM
Newbee
Guest
 
Posts: n/a
Default Re: Problems with images -- newbee

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...


  #4  
Old July 17th, 2005, 11:31 AM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: Problems with images -- newbee

Newbee wrote:[color=blue]
>
> 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...[/color]

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.
jstucklex@attglobal.net
Member of Independent Computer Consultants Association - www.icca.org
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.