Topic: Source (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=9656" title="Pages that link to Topic: Source (Page 1 of 1)" rel="nofollow" >Topic: Source <span class="small">(Page 1 of 1)</span>\

 
marf
Bipolar (III) Inmate

From: Canada
Insane since: Oct 2001

posted posted 07-02-2003 21:40

I am trying to have the html document read the source of the image on my server
but the following isn't working

<img src="file:///C://Program%20Files/Apache%20Group/Apache2/htdocs/sitecontent/banner.jpg">

Any Help?

Rinswind 2th
Maniac (V) Inmate

From: Den Haag: The Royal Residence
Insane since: Jul 2000

posted posted 07-03-2003 00:44

Are you sure you want apache to serve a file from your own directories???
and not from the 'webserver' part at your computer? Only the webserver part should be accesible from the outside and thus via apache-server.

Is the adress from the image correct? Check for case-sensitivity, make sure the name in the html file is exactly the same as what the image is called. ---> img1.GIF could be different from img1.gif

__________________________________________
"Art has to be forgotten. Beauty must be realized."
Piet Mondriaan

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 07-03-2003 03:28

Yeah, what he said.

Not sure how Apache paths are on a Win machine, but something like
<img src="/sitecontent/banner.jpg">
should work better, me thinks.

'course, you'd want to include all of the XHTML required paramaters, such as
<img src="/sitecontent/banner.jpg" width="100" height="100" border="1" alt="" />




[This message has been edited by Pugzly (edited 07-03-2003).]

marf
Bipolar (III) Inmate

From: Canada
Insane since: Oct 2001

posted posted 07-03-2003 04:08

I'm not some n00b who doesn't know html.. I have the Apache web server running on a seperate computer. But I am using php to print the webpage to screen, and I need a direct path to the image or else some pages "/sitecontent/banner/jpg" won't show. I know theres a simple answer that can get me the correct path i need.. I've seen it before.. I just forget how to.

DmS
Paranoid (IV) Inmate

From: Sthlm, Sweden
Insane since: Oct 2000

posted posted 07-03-2003 10:14

Now, hold on a bit here I can't really see why you need to do it this way.

On the box with apache you use php to generate the page.
In the page you want to include a picture that resides in the filesystem on another box.

Why?
This pic will never be visible for anyone else than you since the path you need is a network path that doesn't exist on the web, not a path to another webserver that holds the image.

If a picture should be shown on a webpage it should reside on a webserver that can serve the picture either through a http request or locally on the same box.

One situation where I needed to do something similar is in a preview situation.
1. A user creates content on a site through a webbrowser and picks an image on their local harddisk to be shown in the content.

2. The user now clicks preview and want's to see the content with the image.
However, you (the site owner) don't want to uopload the pic to the server before they actually save the content.

3. What I usually do here is to use the path provided in the $_POST['form_field_type_file_name'] variable (it will hold the path to the local image) to show them the image from their local hard disk in the preview.

Then I'll give them a fileupload form plus a line of text with the path to the image used in the preview on the preview page along with a button to ok the preview.

If they point out the image again and clicks ok then the image will be uploaded and stored on the webserver for use. Then in the real path it will be something like "/sitecontent/images/image.jpg" because then the image will be on the webserver.

And that's about the only situation where I can see why you need to see a page served from a webserver that uses an image that's on your local filesystem.

Or am I way off here?
if it's something completley different you can try this:
<img src="C:\Program Files\Apache Group\Apache2\htdocs\sitecontent\banner.jpg">
That will however point to a place in the filesystem on the same box as apache lives.
a network adress in your local network would probably be something like this:
<img src="\\your_other_computer_networkname\folder_name\folder_name\folder_name\banner.jpg">
Not sure about that one though.

/Dan

{cell 260}
-{ a vibration is a movement that doesn't know which way to go }-

[This message has been edited by DmS (edited 07-03-2003).]

[This message has been edited by DmS (edited 07-03-2003).]

marf
Bipolar (III) Inmate

From: Canada
Insane since: Oct 2001

posted posted 07-03-2003 15:52

Thanks for all your help but I just ended up using a way I didn't want to. The image i am trying to load i not on another computer.. it is on the same drive of the computer. I just ended up using <img src="http://www.my-domain.com/sitecontent/banner.jpg"> and that works good enough.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu