physical path to folder (Full Version)

All Forums >> [Web Development] >> Server Issues



Message


walrus -> physical path to folder (8/27/2006 16:42:21)

I have several sites all hosted on the same server and they all link to a database on one of the sites using a physical connection

something like...
Application("thedata_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=F:/secure/m/mywebsite.co.og/fpdb/database.mdb"

I also display image files from another folder in the root of "mywebsite"

At the moment I use a url link
src='http://mywebsite.co.og/imagefiles/

Can I make a direct path to this folder.
If I try
src='F:/secure/m/mywebsite.co.og/imagefiles/'
I get
file:///F:/secure/m/mywebsite.co.og/imagefiles/


I am using FP2003 on a windows server




rdouglass -> RE: physical path to folder (8/28/2006 9:28:56)

If it's an ASP page, you may be able to use the server.mappath command. Something like this:

<%=Server.Mappath("/images/myfile.jpg")%>

should give you the physical path to that file.

Or maybe I'm waaaay off and you just need to change the link from an absolute to a realtive one:


src='/imagefiles/myfile.jpg'

vs.

src='http://mywebsite.co.og/imagefiles/myfile.jpg'

Those any help?




walrus -> RE: physical path to folder (8/28/2006 13:56:38)

No, I'll try to explain the problem differently

a page (asp) on domain website1.com
needs to display an image from domain website2.com

I know the physical path to both files and folders

I just can't get the image to display.
This is the problem
file:///F:/etc...

I don't want to use src=http:// (which works fine) as this would defeat the object. If this can't be done, then so be it.




rdouglass -> RE: physical path to folder (8/28/2006 16:11:00)

quote:

If this can't be done, then so be it.


I don't believe it can unless both sites use the same directory in a Virtual Directory configuration.

I've never tried that but in theory, it should work. Take a directory and "attach" it to both webs using a Virtual Directory setting. Then they could use the 'common' image.

Maybe?




walrus -> RE: physical path to folder (8/28/2006 16:31:09)

okay, I'll see if my host will set up a virtual directory for me.

Thanks




walrus -> RE: physical path to folder (8/30/2006 10:38:14)

My host has set up a Virtual Directory on the server.

This seems to be the best solution.

Thanks




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.046875