Page 1 of 1

images not showing [SOLVED]

PostPosted: 22. January 2012 23:31
by tchboy
I have xampp running on my development machine and all is working well I have an image that is in a folder on my c drive formy project it needs to that there. In design view in dreamweaver it shows perfectly fine, but when I go to the preview in browser it dissapears. my tag is simple and is this entry.

<img src="file:///C:/movies/ghost/folder.jpg" width="107" height="107" />

I am thinking it's some sort of permissions problem but I don't see why it would have a problem when I can view in the design view of dream weaver.

thanks in advance for any help!!

Re: images not showing

PostPosted: 23. January 2012 00:34
by Sharley
DreamWeaver is not a web server and so can access files in folders outside the DocumentRoot which is the \xampp\htdocs folder of the Apache server - configuring DreamWeaver is not supported in this forum.

The Apache server can access files and folders in the DocumentRoot only by default...

...but there may be a solution for you in this on topic page of answers on the Stack Overflow Q&A web site or the DW web site may also have a configuration solution.

Please let us know if you were successful in finding a solution.

Good luck.:)

Re: images not showing

PostPosted: 23. January 2012 12:28
by tchboy
I think the alias way is the way to go, think I may have misunderstood something. but say for example the image I want to display is

c:\my_movies\StarWars\folder.jpg

Am i creating an alias Alias /mymovies c:/mymovies

In design view dreamweaver won't display it correctly but when I change to the live view in browser it will display correctly?

this is just a design machine and since I am new to this is it possible to get the image to display in design and live environment

Re: images not showing

PostPosted: 23. January 2012 12:38
by tchboy
Meant to say I am making the link /mymovies to c:/mymovies as the next level down is my film collection and eventually I would like the web page display all the films I have

thanks

Re: images not showing

PostPosted: 23. January 2012 15:21
by JonB
You have the right idea with a Alias directive when referencing anything outside the DocumentRoot.

Good Luck
8)

Re: images not showing

PostPosted: 23. January 2012 15:40
by tchboy
so am I right in thinkning that the value for img src should be "/movies/ghost/folder.jpg". I dont have to include file:///C:??

Hope to see my images in the browser tonight.

Re: images not showing

PostPosted: 23. January 2012 17:18
by JonB
AFAIK, the Alias will need the complete path as the files are not in the ServerRoot.

Good Luck

Re: images not showing

PostPosted: 23. January 2012 18:09
by Altrea
:shock:
Do you want to create X Alias just because you have files in different folders in your harddisk you want to use in your project?

why don't you save image files relating to the webproject, INSIDE the webproject directory?
Thats for sure the cleanest and best way to work with it.
And Dreamweaver will love that behavior too.

best wishes,
Altrea

Re: images not showing

PostPosted: 23. January 2012 19:09
by tchboy
I am moving all my dvds on to my harddisc in the folder mymovies, i would rather the webpage read them from that location, instead of copying everything into my website folder.

Re: images not showing

PostPosted: 23. January 2012 19:31
by JonB
Altrea is both right about Dreamweaver, and from a tidiness and debugging point of view, it decreases the likelihood of problems, particularly if you want to use other's scripts.

Good Luck
8)

Re: images not showing

PostPosted: 24. January 2012 09:00
by tchboy
It worked first time now that is a first!! I may change things in future as I get further into this, thanks for everyone's help. Much appreciated.

Re: images not showing

PostPosted: 24. January 2012 09:07
by Sharley
Thanks for the feedback and happy with your success.

I will close this topic and mark it solved.

Please feel free to start a new topic if you have other issues with XAMPP for Windows.

Best wishes. :)