How do I display a file c:\MYDIR\A.jpg ?

P

PHPBABY3

How do I display a file c:\MYDIR\A.jpg ?

These don't work:

<img src="c:\MYDIR\A.jpg">

<img src="c:/MYDIR/A.jpg">

<img src="c:MYDIR\A.jpg">

<img src="c:MYDIR/A.jpg">


P -
 
P

PHPBABY3

Do you mean you are trying to build a web page, post it, and grab an
image from your personal computer to display on the site?  If so, you
must upload the image to the site and correct the path to the image.

The user identifies a bunch of JPG files on their computer. My
program takes them and displays them all on one page. How?
 
J

Jonathan N. Little

PHPBABY3 said:
The user identifies a bunch of JPG files on their computer. My
program takes them and displays them all on one page. How?

If the webpage is in "c:\MYDIR" then just put <img src="A.jpg"... else
you have to use relative paths, remember for webpage path separators are "/"

so for:

HTMLfolder
HTMLfolder/IMGfolder

<img src="IMGfolder/A.jpg">

or for

SomeFolder/HTMLfolder
SomeFolder/IMGfolder

<img src="../IMGfolder/A.jpg">
 
A

Adrienne Boswell

Gazing into my crystal ball I observed PHPBABY3 <[email protected]>
writing in (e-mail address removed):
The user identifies a bunch of JPG files on their computer. My
program takes them and displays them all on one page. How?

You will have to use some kind of upload script on your page to get the
images and save them to your server. If you are thinking of putting the
images into a database, I would highly recommend you do not do so --
only store the path to the image in the db.

Once you have the images on your server, simply use the path to the
images on your server.
 
F

faerber.jan

The user identifies a bunch of JPG files on their computer.  My
program takes them and displays them all on one page.  How?

So come on - if you can write a program like ICQ personal Web server
you should know what to do.

Jan
 
P

PHPBABY3

So come on - if you can write a program like ICQ personal Web server
you should know what to do.

Jan

Ok for the lesson in logic. Now how do I do what I want to do?

P -
 
J

Jonathan N. Little

frank said:
decided to write it up.
..................
<html>
<head><title>The Window</title>
<script type='text/javascript' language='javascript'>
var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=400,width=200');
if (window.focus) {newwindow.focus()}
}
</script>
</head>
<body>
This links to a window<p>
<a href="javascript:poptastic('c:/myFile/whatever.html');">the literal</a>

Don't expect that to work in Firefox. The above is bad in so many ways...

To OP is is unclear of what you wish. Is this an HTML page on a local
system to display images also on the local system or are your trying to
display images from a local system in a web page online?
 
J

Jonathan N. Little

SAZ said:
But still, the OP has not yet answered the first question:

Do you mean you are trying to build a web page, post it, and grab an
image from your personal computer to display on the site?

Been asking too. Not sure OP knows at all what (s)he is doing. Trying to
guess is just a waste of time.
 
R

richard

I think what you really want is a link to a javascript that generates a
window that contains the specific image. Google javascript + windows.
These will provide scripts that will generate a window that can
- by virtue of the javascript - size the window to a specific size and
appear in a specific location. This window can contain the img
tag detail that will display the image.

A decent tutorial on this is :

http://www.howtocreate.co.uk/tutorials/javascript/browserwindow

Go to it!

Totlaly frickin wrong!
He has the wright approach.
 
R

richard

How do I display a file c:\MYDIR\A.jpg ?

These don't work:

<img src="c:\MYDIR\A.jpg">

<img src="c:/MYDIR/A.jpg">

<img src="c:MYDIR\A.jpg">

<img src="c:MYDIR/A.jpg">


P -


<img src="MYDIR/A.jpg">

Assuming that the host file is in the same directory as "MYDIR".

You do not need the "C:" unless the src file is in another drive.
 
R

rf

<img src="MYDIR/A.jpg">

Assuming that the host file is in the same directory as "MYDIR".

You do not need the "C:" unless the src file is in another drive.

Totlaly frickin wrong! :)

The OP is talking about files on *the users* computer, not the host in
which case src="c:/MYDIR/A.jpg" but, OP, don't expect it to work in
secure (that is non-IE) browsers.
 
R

Raymond SCHMIT

Totlaly frickin wrong! :)

The OP is talking about files on *the users* computer, not the host in
which case src="c:/MYDIR/A.jpg" but, OP, don't expect it to work in
secure (that is non-IE) browsers.

Correct ! *But* ... i cannot understand the interest of this.
If the end-user did not have the file c:\MYDIR\A.jpg" on his computer
- the picture will never appear. Nobody have this file on his computer
! (except may be the creator of the html code :)
 
J

Jonathan N. Little

Raymond said:
Correct ! *But* ... i cannot understand the interest of this.
If the end-user did not have the file c:\MYDIR\A.jpg" on his computer
- the picture will never appear. Nobody have this file on his computer
! (except may be the creator of the html code :)

So what's your point? Fact is "c:\MYDIR\A.jpg" is not a valid path for a
web page. It is a valid path for a local Windows system. Of course is it
really clear what you *really* are trying to accomplish.
 
R

Raymond SCHMIT

So what's your point? Fact is "c:\MYDIR\A.jpg" is not a valid path for a
web page. It is a valid path for a local Windows system. Of course is it
really clear what you *really* are trying to accomplish.

I am not trying to accomplish something, i just don't understand what
interest someone can have with that possibility.
Normally the http philosophy is based on a virtual directory placed on
a physical disk at the server side. All files miust come from this
server or from another server.....never from a physical disk of the
end-user.
 
J

Jonathan N. Little

Raymond said:
I am not trying to accomplish something, i just don't understand what
interest someone can have with that possibility.
Normally the http philosophy is based on a virtual directory placed on
a physical disk at the server side. All files miust come from this
server or from another server.....never from a physical disk of the
end-user.

Okay so what's with the "c:\" ... If it ids coming from a server, even
MS's IIS the url will be to a document root of the webserver not the
local filesystem of the server...
 
R

Raymond SCHMIT

Okay so what's with the "c:\" ... If it ids coming from a server, even
MS's IIS the url will be to a document root of the webserver not the
local filesystem of the server...

I did not agree with you - The root of the files on the server *is
not* a physical adress "C:\" ......The root of the server is the
Virtual directory....this will permit tou have more than one website
on the same server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top