Ask a Question related to ASP, Design and Development.
-
Scott Tilton #1
Convert Physical path to Virtual path?
We have a field that gets filled into a database that our ASP website pulls
from. What we would like to be able to do is to take that path and convert
it to a virtual path so the website can display the image. We have setup
with our website a virtual directory for: "g:\quotewerks\images\" which is
[url]http://www.ourwebsite/images[/url].
So, below you can see the data we pull from the field in the database, and
what I need it to look like. Can anyone help me out with the code to do
this?
From database:
q:\quotewerks\images\contact systems\contac3s.jpg
q:\quotewerks\images\fuji\cp6-5 cal\mvc-012f(2).jpg
q:\quotewerks\images\front emerald.jpg
Needs to be changed to:
/images/contact systems/contac3s.jpg
/images/fuji/cp6-5 cal/mvc-012f(2).jpg
/images/front emerald.jpg
Any help would be great, thanks!
Best Regards,
Scott B. Tilton
Avantek Services
Phone: (603)742-1333 Ext. 26
Fax: (603)299-0323
[email]stilton@avantekservices.com[/email] or [email]stilton@avsv.com[/email]
[url]www.avantekservices.com[/url] or [url]www.avsv.com[/url]
"A focused mind is the ultimate weapon." - Unknown
** Support Cancer Research: [url]http://www.rosepedal2003.com[/url] **
Scott Tilton Guest
-
Retrieving physical path on the server
Hi everyone, this is my first message on a macromedia forum, so I hope I've choosen the right forum... if not, please tell me :) My problem is... -
Virtual Path
Hi, I have an application with a connection.asp document linking to the MS Access database Previously I have had the database ABOVE the ROOT and... -
finding the physical path of an include file when parsing
How do I find the path to an include file from inside the file when loaded? The file is located above the doc root. The script which includes the... -
Convert text path back to regular path
Im sure this has been covereed beofre , but I want to take an oddly shaped pathy that I have converted to a text path, and revert it to a regualr... -
virtual path problem
hi, I have a script in a folder which simply creates a file in another dump folder /myscript/script.php /myscript/dumpfolder/ but then i... -
Aaron Bertrand - MVP #2
Re: Convert Physical path to Virtual path?
path = "q:\quotewerks\images\front emerald.jpg"
path = replace(replace(path, "q:\quoteworks", ""), "\", "/")
response.write path
"Scott Tilton" <stilton@avantekservices.com> wrote in message
news:OgJek47RDHA.3192@TK2MSFTNGP10.phx.gbl...pulls> We have a field that gets filled into a database that our ASP websiteconvert> from. What we would like to be able to do is to take that path andis> it to a virtual path so the website can display the image. We have setup
> with our website a virtual directory for: "g:\quotewerks\images\" which> [url]http://www.ourwebsite/images[/url].
>
> So, below you can see the data we pull from the field in the database, and
> what I need it to look like. Can anyone help me out with the code to do
> this?
>
> From database:
>
> q:\quotewerks\images\contact systems\contac3s.jpg
> q:\quotewerks\images\fuji\cp6-5 cal\mvc-012f(2).jpg
> q:\quotewerks\images\front emerald.jpg
>
> Needs to be changed to:
>
> /images/contact systems/contac3s.jpg
> /images/fuji/cp6-5 cal/mvc-012f(2).jpg
> /images/front emerald.jpg
>
>
> Any help would be great, thanks!
>
> Best Regards,
>
> Scott B. Tilton
>
> Avantek Services
> Phone: (603)742-1333 Ext. 26
> Fax: (603)299-0323
> [email]stilton@avantekservices.com[/email] or [email]stilton@avsv.com[/email]
> [url]www.avantekservices.com[/url] or [url]www.avsv.com[/url]
>
> "A focused mind is the ultimate weapon." - Unknown
>
> ** Support Cancer Research: [url]http://www.rosepedal2003.com[/url] **
>
>
Aaron Bertrand - MVP Guest
-
Dhananjay Modak #3
Re: Convert Physical path to Virtual path?
One way is:
- read physical path
- use combination of mid and instr functions to find the 2nd slash
- cut the string at the 2nd slash (assumption: first directory is the root
of the web site)
cheers
Dhananjay
"Scott Tilton" <stilton@avantekservices.com> wrote in message
news:OgJek47RDHA.3192@TK2MSFTNGP10.phx.gbl...pulls> We have a field that gets filled into a database that our ASP websiteconvert> from. What we would like to be able to do is to take that path andis> it to a virtual path so the website can display the image. We have setup
> with our website a virtual directory for: "g:\quotewerks\images\" which> [url]http://www.ourwebsite/images[/url].
>
> So, below you can see the data we pull from the field in the database, and
> what I need it to look like. Can anyone help me out with the code to do
> this?
>
> From database:
>
> q:\quotewerks\images\contact systems\contac3s.jpg
> q:\quotewerks\images\fuji\cp6-5 cal\mvc-012f(2).jpg
> q:\quotewerks\images\front emerald.jpg
>
> Needs to be changed to:
>
> /images/contact systems/contac3s.jpg
> /images/fuji/cp6-5 cal/mvc-012f(2).jpg
> /images/front emerald.jpg
>
>
> Any help would be great, thanks!
>
> Best Regards,
>
> Scott B. Tilton
>
> Avantek Services
> Phone: (603)742-1333 Ext. 26
> Fax: (603)299-0323
> [email]stilton@avantekservices.com[/email] or [email]stilton@avsv.com[/email]
> [url]www.avantekservices.com[/url] or [url]www.avsv.com[/url]
>
> "A focused mind is the ultimate weapon." - Unknown
>
> ** Support Cancer Research: [url]http://www.rosepedal2003.com[/url] **
>
>
Dhananjay Modak Guest



Reply With Quote

