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
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
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
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
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
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
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
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
Hi Leif,
Monday, March 7, 2005, 10:03:48 AM, you wrote:
LG Hello Tom,
LG Friday, March 4, 2005, 9:13:41 PM, you wrote:
TR This will set the include path just before the document root:
LG H. Not quite what I'm looking for. I set up some test folders and
LG files on a development machine to
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:
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
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:
Hi,
Monday, March 7, 2005, 1:08:27 PM, you wrote:
LG Hello Tom,
LG Sunday, March 6, 2005, 6:18:54 PM, you wrote:
TR and let me see what it prints
LG Still not quite there.
LG Site root
LG **
LG File name: C:\Sambar\docs\test\test.php
LG Script: /test.php
LG Document root:
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
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
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
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
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
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
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
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
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
Hi,
Saturday, March 5, 2005, 5:47:07 AM, you wrote:
LG Hello Richard,
LG Friday, March 4, 2005, 11:41:29 AM, you wrote:
R http://php.net/set_include_path
LG Ok... Maybe I should put all this together in one e-mail so that all
LG the issues can be looked at...
LG The problem:
LG Finding a
Hi,
TR This will set the include path just before the document root:
TR if(isset($_SERVER[SCRIPT_FILENAME])){
TR $root = $_SERVER['SCRIPT_FILENAME'];
TR //echo Root: $rootbr;
TR $script = $_SERVER['SCRIPT_NAME'];
TR $document_root =
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:
Hi,
Thursday, March 3, 2005, 11:54:48 AM, you wrote:
A If I'm reading you correctly, then a truly transportable include might look
like
A this:
A $doc_root= (isset($_SERVER['path_translated'])?
A $_SERVER['path_translated'] :
A $_SERVER['document_root'];
Exactly
--
regards,
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
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']= /usr/local/apache/htdocs
$_SERVER['path_translated']= /home/user/public_html/
What
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']=
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:
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']=
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']=
: [PHP] Document root
Hi!
Is there any constant in php like $DOCUMENT_ROOT
which holds path to the
Document root of the server?
I want to do something like this:
$path=$DOCUMENT_ROOT./files/one.php;
echo a href=\$path\;
Thanks in advance,
Mukta
--
PHP General Mailing List (http
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
Hi!
Is there any constant in php like $DOCUMENT_ROOT which holds path to the
Document root of the server?
I want to do something like this:
$path=$DOCUMENT_ROOT./files/one.php;
echo a href=\$path\;
Thanks in advance,
Mukta
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
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 things like $document_root which didn't
seem to work
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
$_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
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 ftp.
Better to explain;
If for example
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
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
Please help me !
In phpinfo() i find my document root but existing some PHP variable which
had document_root inside.
Thankx
roman
for example : Document root : x:\php
maybe echo $Document_root show x:\php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL
TECTED]
Sent: Tuesday, July 24, 2001 8:20 AM
Subject: [PHP] Document root
Please help me !
In phpinfo() i find my document root but existing some PHP variable which
had document_root inside.
Thankx
roman
for example : Document root : x:\php
maybe echo $Document_root show x:\php
--
43 matches
Mail list logo