473,372 Members | 1,011 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,372 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 4088
<!--#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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.