473,387 Members | 1,757 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,387 software developers and data experts.

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 1909
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Javier | last post by:
Hello, I'm very new in this forum and as I have the following problem, the website is in http://new.vanara.com ----------------------------------------------------------------------------...
2
by: Newbee Adam | last post by:
some said that .NET app can run on any program where rutime exists. What is "runtime" in this sense? will I have to install runtime or .net framework or .NET support on an xp machine for a...
3
by: Scott | last post by:
Hello, we are having problems displaying non-aspx files (images, style sheets) since we have upgraded to the 1.1 framework when using a cookieless session (sessionID in the url). Check out...
3
by: John Tacke | last post by:
When developing ASP.NET apps using Microsoft's recommended isolated model (develop on your local iis), there are deployement reference problems because the local website is generally one level deeper...
2
by: BluDog | last post by:
Hi I have a created a custom web control called ImageBrowser, extract is below: <Code> #Region "Properties" Public Property Images() As ImageCollection
3
by: Jeff | last post by:
I've been working on an application for a while now that has been giving me some trouble when it comes to working with a picturebox and memory usage. My company deals with digital imaging, so we...
1
by: baroque Chou | last post by:
Thanks for the help available on msdn, I have succesful done the rewrite job. But there are 2 problems arise: 1.when I try to rewrite the url from say: www.yoursite.com/beverages.aspx to...
0
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an...
13
by: charliefortune | last post by:
I am fetching some product feeds with PHP like this $merch = substr($key,1); $feed = file_get_contents($_POST); $fp = fopen("./feeds/feed".$merch.".txt","w+"); fwrite ($fp,$feed); fclose...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.