473,322 Members | 1,614 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,322 software developers and data experts.

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 call this script from my index
page which is in the root folder

/index.php

and it doesnt go to /myscript/dumpfolder/
but it looks for the /dumpfolder/

how can I always have the rigth path if
I call this script from anywhere on my
site ?

Thank you very much !

Yang
--

Jul 17 '05 #1
1 4719
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
"Yang Li Ke" <ya******@sympatico.ca> wrote in message
news:WY******************@news20.bellglobal.com...
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 call this script from my index
page which is in the root folder

/index.php

and it doesnt go to /myscript/dumpfolder/
but it looks for the /dumpfolder/

how can I always have the rigth path if
I call this script from anywhere on my
site ?


What has script.php got to do with your example above?

Correct me if I am wrong - If you are in a directory path /my/directory/here
and you want to run your script from there, and for it to look in
/my/directory/dumpfolder then try using $_SERVER[DOCUMENT_ROOT] to help find
your current root folder - it works for virtual hosts too...
Jul 17 '05 #2

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

Similar topics

8
by: And | last post by:
Hi everyone my database is in a folder inside the inetpub folder (c:\inetpub\bd\mydatabase.mdb) and my web application is in a folder inside the wwwroot folder. My question is: Is there a way...
8
by: nick | last post by:
I have a problem and I've been using a cheezy work around and was wondering if anyone else out there has a better solution. The problem: Let's say I have a web application appA. Locally, I set...
5
by: Stu Carter | last post by:
Hi, ENV: Windows 2003 Server SP1 (+all updates), VS 2003, .Net 1.1 SP1 We've got an ASP.Net web application using State Service. All is fine until we tried to use the app through a virtual...
14
by: Lorenzo | last post by:
Hello, I have a web application with a virtual directory in it. With 'virtual directory' i mean a folder whose physical path is different from the physical path of the application, but in which...
2
by: Lucky | last post by:
Hi guys, Again asking Question regarding Virtual Directories. now i've got the Virtual Directories list with the help of Michael. the code is used to get the virtual directory is ...
4
by: tommaso.gastaldi | last post by:
Hi friends I was in the need to find a sort of "definitive" :) solution to transform a virtual path such as "~/MyDir/MyFile into a full web address. In particular I needed it * within web...
8
by: JJ | last post by:
I'm confused about paths. I have a functionn that uses the mappath method, which I think requires a virtual path (is that the same as a relative path?). But this doesn't always work as the...
1
by: =?Utf-8?B?SWJyYWhpbQ==?= | last post by:
I have probelm to deploy ASP.net2 Application implement in this Application the Virtual path provider techinque what I have done : 1- built the web Application with Asp.net2 as File system...
1
by: Ibrahim | last post by:
I have made an Aplication use VPP and make deploy for it on IIS on windows 2003 Server 1- built the web Application with Asp.net2 2- Implement the Virtual path provider (Virtual path , virtual...
4
by: tshad | last post by:
I have a site www.stf.com and a site www.stfstage.com (where I do all my testing). The problem is that www.stfstage.com is only internal and I need to get access from the outside (without...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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...

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.