Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

img src path in windows

Status
Not open for further replies.

tmffm

Technical User
Jun 12, 2007
10
Before I get into an actual example, perhaps someone would be nice enough to provide a simple example of the syntax for writing to a file using IMG SRC with a full windows path

so, for example

print OUT "<center><img src='C:/Documents and Settings/Administrator/Desktop/File/file.gif'>\n";

does NOT work.
 
Do you have a web server? You are going to have to have the files in the path that the web server knows about. I think if you are going to have spaces in img src they need to be surrounded by double quotes not single.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
your path to the image needs to be relative to the webserver's root directory

<img src=/images/file.gif alt="whatever" title="whatever"> would refer to a file stored in the images subdirectory of the webserver's root directory

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
Not from a server. For internal use only.

I can't even get this thing to print to an HTML page with a simple .jpg file, no dashes, from my desktop.

print OUT4 "<center><img src= 'C:\Documents and Settings\Administrator\Desktop\RRPphoto.jpg'>\n";

Any idea why this code won't work?

If I can get the syntax to work at this level, I can handle the intricacies of the actual files.
 
I don't think I understand your problem. You can't get it to write to a HTML file?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Actually, it turns I can get it write, I just can't view it with Mozilla. The image appears fine when viewed with IE. How do I handle the space between Documents and Settings inside of a print statement?

or just assign it to a variable?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top