473,395 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Frustrated by relative paths - a way around this?

Can anyone help me find a solution to quickly working out relative paths to
a folder in the root of my server...

Although it easy when you go - say - two levels down:

.../includes

it becomes increasingly difficult to ball park the folder when you go deeper
and wider down:

.../.../.../includes

....How do you guys get a quick fix on where the hell the folder or file is
and use that path in asp?

Thanks in advance
Jason
Jul 19 '05 #1
5 4089
<!--#Include Virtual="WebApp\includes\filename.asp"-->

"jason" <ja***@catamaranco.com> wrote in message
news:Ox**************@TK2MSFTNGP11.phx.gbl...
Can anyone help me find a solution to quickly working out relative paths to a folder in the root of my server...

Although it easy when you go - say - two levels down:

../includes

it becomes increasingly difficult to ball park the folder when you go deeper and wider down:

../.../.../includes

...How do you guys get a quick fix on where the hell the folder or file is
and use that path in asp?

Thanks in advance
Jason

Jul 19 '05 #2
Nooooooooooo - this is a poisoned chalice - as moving web hosts will create
additional problems....how do seasoned asp developers quickly ascertain the
relative path of a folder if they are scripting deep inside the folder
structure....I cannot believe Visual Interdev does not have a quick and easy
feature to do this? Or does it? Maybe I will be forced to scan for a 3rd
party application...

- Jason
"Tom B" <sh*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP11.phx.gbl...
<!--#Include Virtual="WebApp\includes\filename.asp"-->

"jason" <ja***@catamaranco.com> wrote in message
news:Ox**************@TK2MSFTNGP11.phx.gbl...
Can anyone help me find a solution to quickly working out relative paths

to
a folder in the root of my server...

Although it easy when you go - say - two levels down:

../includes

it becomes increasingly difficult to ball park the folder when you go

deeper
and wider down:

../.../.../includes

...How do you guys get a quick fix on where the hell the folder or file is and use that path in asp?

Thanks in advance
Jason


Jul 19 '05 #3
....Using a virtual path also has tricky implications for testing on a local
and remote machine.

I would have to re-code absolute paths each time I test on my local machine
and then re-adjust when I upload to target server...

- Jason
"Tom B" <sh*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP11.phx.gbl...
<!--#Include Virtual="WebApp\includes\filename.asp"-->

"jason" <ja***@catamaranco.com> wrote in message
news:Ox**************@TK2MSFTNGP11.phx.gbl...
Can anyone help me find a solution to quickly working out relative paths

to
a folder in the root of my server...

Although it easy when you go - say - two levels down:

../includes

it becomes increasingly difficult to ball park the folder when you go

deeper
and wider down:

../.../.../includes

...How do you guys get a quick fix on where the hell the folder or file is and use that path in asp?

Thanks in advance
Jason


Jul 19 '05 #4
I've always used virtual includes. My development machine is set up
identically to my production machine, so transferring to the production
server isn't a problem.
I believe(and could be wrong) that you are more likely to run into trouble
using relative paths, as I've seen frequent comments regarding using
includes in "higher" directories being disallowed by ISPs

"jason" <ja***@catamaranco.com> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
Nooooooooooo - this is a poisoned chalice - as moving web hosts will create additional problems....how do seasoned asp developers quickly ascertain the relative path of a folder if they are scripting deep inside the folder
structure....I cannot believe Visual Interdev does not have a quick and easy feature to do this? Or does it? Maybe I will be forced to scan for a 3rd
party application...

- Jason
"Tom B" <sh*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP11.phx.gbl...
<!--#Include Virtual="WebApp\includes\filename.asp"-->

"jason" <ja***@catamaranco.com> wrote in message
news:Ox**************@TK2MSFTNGP11.phx.gbl...
Can anyone help me find a solution to quickly working out relative
paths
to
a folder in the root of my server...

Although it easy when you go - say - two levels down:

../includes

it becomes increasingly difficult to ball park the folder when you go deeper
and wider down:

../.../.../includes

...How do you guys get a quick fix on where the hell the folder or

file is and use that path in asp?

Thanks in advance
Jason



Jul 19 '05 #5
A lot of it comes from choosing a folder structure that is logical with
elemens that are required to be referenced by other elements being placed
below them (deeper in the tree structure).
Of course for images and scripts etc. this becomes difficult.
It is hard to keep track of but if you drag and drop the file onto an HTML
page in Interdev then you can immdiately see the relative path.
IIS makes it hard because root relative paths (eg. starts with '/') do not
reference corretcly when debugging locally since the root relative path
refers to the website, not the web application. When you debug locally, what
was a website becomes a web application one folder deeper in the local IIS
and the root relative paths no longer apply.

Personally, I always use relative paths to avoid issues in debugging and
moving the site to another location even though it ultimately becomes harder
to manage during development.

Chris.
"jason" <ja***@catamaranco.com> wrote in message
news:Op**************@TK2MSFTNGP12.phx.gbl...
Ok - Tom - I'm going with your suggestion I just realised I was trying to
put the full physical path in...instead of just the subfolder residing in
the root of my server which matches my local root....damn, I'm slow! ;)

"Tom B" <sh*****@hotmail.com> wrote in message
news:eU**************@TK2MSFTNGP10.phx.gbl...
I've always used virtual includes. My development machine is set up
identically to my production machine, so transferring to the production
server isn't a problem.
I believe(and could be wrong) that you are more likely to run into trouble
using relative paths, as I've seen frequent comments regarding using
includes in "higher" directories being disallowed by ISPs

"jason" <ja***@catamaranco.com> wrote in message
news:ue**************@TK2MSFTNGP10.phx.gbl...
Nooooooooooo - this is a poisoned chalice - as moving web hosts will

create
additional problems....how do seasoned asp developers quickly ascertain
the
relative path of a folder if they are scripting deep inside the folder
structure....I cannot believe Visual Interdev does not have a quick
and easy
feature to do this? Or does it? Maybe I will be forced to scan for a

3rd party application...

- Jason
"Tom B" <sh*****@hotmail.com> wrote in message
news:#2**************@TK2MSFTNGP11.phx.gbl...
> <!--#Include Virtual="WebApp\includes\filename.asp"-->
>
> "jason" <ja***@catamaranco.com> wrote in message
> news:Ox**************@TK2MSFTNGP11.phx.gbl...
> > Can anyone help me find a solution to quickly working out relative

paths
> to
> > a folder in the root of my server...
> >
> > Although it easy when you go - say - two levels down:
> >
> > ../includes
> >
> > it becomes increasingly difficult to ball park the folder when you

go > deeper
> > and wider down:
> >
> > ../.../.../includes
> >
> > ...How do you guys get a quick fix on where the hell the folder or

file
is
> > and use that path in asp?
> >
> > Thanks in advance
> > Jason
> >
> >
>
>



Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

43
by: steve | last post by:
I am quite frustrated with php’s include, as I have spent a ton of time on it already... anyone can tell me why it was designed like this (or something I don’t get)? The path in include is...
3
by: Andreas Busse | last post by:
Hi, I received a big fat package of source code developed with Metrowerks CodeWarrior and now I am trying to convert this project to VC.NET 2003. My problem is, that in order to compile I have...
11
by: MBS | last post by:
I am playing around with some PHP code. I want to put in an include() function so I can include existing HTML code and output it to the browser. Lo and behold PHP does not support relative paths...
15
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would...
2
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.