Re: [PHP] Document root, preferred way to find it???

2005-03-08 Thread Jochem Maas
Leif Gregory wrote: Hello Marek, Sunday, March 6, 2005, 7:08:24 PM, you wrote: I don't see where that tells me where the include folder would be. MK If you know how the files are layed out in your application, you do. No... You missed the point of this whole thread which was explained in point 1

Re: [PHP] Document root, preferred way to find it???

2005-03-08 Thread Leif Gregory
Hello Jochem, Tuesday, March 8, 2005, 3:30:19 AM, you wrote: J link rel=stylesheet type=text/css title=Site CSS href=includes/site.css / J I'm pretty sure the url is ./includes/site.css i.e. the include J subdir of the dir in which the html file that includes the link tag J is in. if you move

RE: [PHP] Document root, preferred way to find it???

2005-03-08 Thread Chris W. Parker
Leif Gregory mailto:[EMAIL PROTECTED] on Tuesday, March 08, 2005 6:55 AM said: link rel=stylesheet type=text/css title=Site CSS href=/includes/site.css / and I've never placed a period at the beginning. But you raise an interesting point. Is the server telling the browser where the

Re: [PHP] SOLVED: Re: [PHP] Document root, preferred way to find it???

2005-03-07 Thread Leif Gregory
Hello Tom, Sunday, March 6, 2005, 11:20:04 PM, you wrote: T I do this for security as I have things in include that I don't T want to be avaiable directly to the browser Also you don't need a T path for include files you can just do: Don't necessarily disagree with you there other than if you

Re[2]: [PHP] SOLVED: Re: [PHP] Document root, preferred way to find it???

2005-03-07 Thread Tom Rogers
Hi, Tuesday, March 8, 2005, 12:03:54 AM, you wrote: LG Hello Tom, LG Sunday, March 6, 2005, 11:20:04 PM, you wrote: T I do this for security as I have things in include that I don't T want to be avaiable directly to the browser Also you don't need a T path for include files you can just do: LG

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Marek Kilimajer
dirname(__FILE__) and then get rid of the subpath where the check is made ('/include' for example) Leif Gregory wrote: Hello Richard, Friday, March 4, 2005, 11:41:29 AM, you wrote: R http://php.net/set_include_path Ok... Maybe I should put all this together in one e-mail so that all the issues

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Tom, Friday, March 4, 2005, 9:13:41 PM, you wrote: TR This will set the include path just before the document root: H. Not quite what I'm looking for. I set up some test folders and files on a development machine to play with your script. Here's how it was laid out: The document root

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Marek, Sunday, March 6, 2005, 4:23:51 PM, you wrote: MK dirname(__FILE__) MK and then get rid of the subpath where the check is made MK ('/include' for example) I'm not sure I'm completely following you. Let's say I had the following: Site root c:\apache\htdocs\test A subfolder of site

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Marek Kilimajer
Leif Gregory wrote: I'm not sure I'm completely following you. Let's say I had the following: Site root c:\apache\htdocs\test A subfolder of site root folder1 A subfolder of the above folder1 folder2 If I call dirname(__FILE__) from a page in each folder I'll get the following respectively:

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Marek, Sunday, March 6, 2005, 7:08:24 PM, you wrote: I don't see where that tells me where the include folder would be. MK If you know how the files are layed out in your application, you do. No... You missed the point of this whole thread which was explained in point 1 and point 2 of the

Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Tom, Sunday, March 6, 2005, 6:18:54 PM, you wrote: TR and let me see what it prints Still not quite there. Site root ** File name: C:\Sambar\docs\test\test.php Script: /test.php Document root: C:\Sambar\docs\test\test.php Base: test.php Include: C:\Sambar\docs\test\include OS:

[PHP] SOLVED: Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Leif Gregory
Hello Tom, Sunday, March 6, 2005, 10:00:17 PM, you wrote: TR Ok I see where is is going wrong, try this: Oh, very close. Although you have it at $document_root and all that needs to be added is '/include' like below: $include = $document_root . '/include'; Otherwise it's one directory too

Re: [PHP] SOLVED: Re: [PHP] Document root, preferred way to find it???

2005-03-06 Thread Tom Rogers
Hi, Monday, March 7, 2005, 3:57:50 PM, you wrote: LG Hello Tom, LG Sunday, March 6, 2005, 10:00:17 PM, you wrote: TR Ok I see where is is going wrong, try this: LG Oh, very close. Although you have it at $document_root and all LG that needs to be added is '/include' like below: LG $include

RE: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Chris W. Parker
Leif Gregory mailto:[EMAIL PROTECTED] on Thursday, March 03, 2005 5:31 PM said: Hello Richard, Thursday, March 3, 2005, 1:15:38 PM, you wrote: include_path In the php.ini? But wouldn't that affect every virtual host on the server? Meaning I'd have to put all the includes for every

Re: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Leif Gregory
Hello Chris, Friday, March 4, 2005, 9:58:05 AM, you wrote: C .htaccess Right.. But if you're on a hosted server running Sambar which is configured to ignore .htaccess, then what? (I'm not being facetious, this is actually an issue I've run across for a client). My point I guess, is that there

RE: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Richard Lynch
Chris W. Parker wrote: Leif Gregory mailto:[EMAIL PROTECTED] on Thursday, March 03, 2005 5:31 PM said: Hello Richard, Thursday, March 3, 2005, 1:15:38 PM, you wrote: include_path In the php.ini? But wouldn't that affect every virtual host on the server? Meaning I'd have to put

Re: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Leif Gregory
Hello Richard, Friday, March 4, 2005, 11:41:29 AM, you wrote: R http://php.net/set_include_path Ok... Maybe I should put all this together in one e-mail so that all the issues can be looked at... The problem: Finding a reliable method to include files, keeping in mind the following: 1. The

Re: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Richard Lynch
6. The method (and this is the important one IMHO) would not require editing x number of pages in a site to change some static path that was set on each page. I believe you could get x to be 1, if you do this: 1. Set up a config_include_path.inc file in your DocumentRoot (possibly

Re: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Leif Gregory
Hello Richard, Friday, March 4, 2005, 1:25:35 PM, you wrote: R If *those* are broken, you might as well just not use that host. R :-^ Your solution seems to be pretty bulletproof. I definitely appreciate it. Just wondering though for posterity sake, have you or anyone ever run into a host that

Re: [PHP] Document root, preferred way to find it???

2005-03-04 Thread Richard Lynch
Leif Gregory wrote: Friday, March 4, 2005, 1:25:35 PM, you wrote: R If *those* are broken, you might as well just not use that host. R :-^ Your solution seems to be pretty bulletproof. I definitely appreciate it. Just wondering though for posterity sake, have you or anyone ever run into a

Re: [PHP] Document root, preferred way to find it???

2005-03-03 Thread Richard Lynch
Leif Gregory wrote: http://www.devtek.org/tutorials/dynamic_document_root.php I'm still looking for a better way, cause this is kludgy. include_path -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Document root, preferred way to find it???

2005-03-03 Thread Leif Gregory
Hello Richard, Thursday, March 3, 2005, 1:15:38 PM, you wrote: RL include_path In the php.ini? But wouldn't that affect every virtual host on the server? Meaning I'd have to put all the includes for every virtual host in the same place? Cheers, Leif Gregory -- TB Lists Moderator (and fellow

RE: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Chris W. Parker
Al mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 11:22 AM said: I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path for includes, etc. We just moved the site to a new virtual host and it doesn't work. print_r() gives me: $_SERVER['document_root']=

Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Leif Gregory
Hello Al, Wednesday, March 2, 2005, 12:21:58 PM, you wrote: A What do you guys use for you docroot? I ran into the same problem and also asked here for any ideas. I finally ended up writing my own function to do it. You can find the tutorial here:

Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Tom Rogers
Hi, Thursday, March 3, 2005, 5:21:58 AM, you wrote: A I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path A for includes, etc. A We just moved the site to a new virtual host and it doesn't work. print_r() A gives me: $_SERVER['document_root']=

Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Al
Tom Rogers wrote: Hi, Thursday, March 3, 2005, 5:21:58 AM, you wrote: A I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path A for includes, etc. A We just moved the site to a new virtual host and it doesn't work. print_r() A gives me: $_SERVER['document_root']=

Re: [PHP] Document root

2003-08-14 Thread Analysis Solutions
Hey Mukta: On Tue, Aug 12, 2003 at 04:27:55PM +, Mukta Telang wrote: Is there any constant in php like $DOCUMENT_ROOT which holds path to the Document root of the server? 1) $_SERVER['DOCUMENT_ROOT'] 2) Check out phpinfo(). It will produce answers to this and MANY other questions for

Re: [PHP] document root variable or function

2002-05-17 Thread Jason Wong
On Friday 17 May 2002 20:56, [EMAIL PROTECTED] wrote: Is there a variable in PHP which will show the directory of the document root? I have done a few searches and before I go looking harder I thought I'd ask. My problem is that I am using both windows, IIS and linux, Apache. I tried a few

Re: [PHP] document root variable or function

2002-05-17 Thread Michael Virnstein
$_SERVER[DOCUMENT_ROOT] Jason Wong [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Friday 17 May 2002 20:56, [EMAIL PROTECTED] wrote: Is there a variable in PHP which will show the directory of the document root? I have done a few searches and before

Re: [PHP] document root

2002-04-17 Thread Miguel Cruz
On Thu, 18 Apr 2002, [iso-8859-9] Senih Özkiper wrote: What is the best way, to find out the directory, where web documents stored, on a .nix web server? I need that, because I want to install my application files on customers web server directly and automatically from my web server using

RE: [PHP] document root

2002-04-17 Thread Senih Özkiper
Thanks Miquel, I asked it hopeless. Senih -Original Message- From: Miguel Cruz [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 3:25 AM To: Senih Özkiper Cc: [EMAIL PROTECTED] Subject: Re: [PHP] document root On Thu, 18 Apr 2002, [iso-8859-9] Senih Özkiper wrote: What

Re: [PHP] Document root

2001-07-24 Thread pierre-yves
You seem to be on windows, check with phpinfo() for this var. (I use this on unix and assume it would be the same for win) ? echo $HTTP_SERVER_VARS["SCRIPT_FILENAME"]; ? py - Original Message - From: "Roman" [EMAIL PROTECTED] To: "Php-General" [EMAIL PROTECTED] Sent: Tuesday, July 24,