Re: [PHP] Re: help condensing regular expressions

2002-04-06 Thread Tom Rogers
Hi I have never used .htaccess but I'll read up on it, I am the ISP so it won't be a problem :) Tom At 06:12 PM 6/04/2002, Chris Adams wrote: >In article <[EMAIL PROTECTED]>, Tom >Rogers wrote: > > Thats what I was after :) > >Glad I could help. > > > At the top of each page I now do > > > > $r

Re: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Chris Adams
In article <[EMAIL PROTECTED]>, Tom Rogers wrote: > Thats what I was after :) Glad I could help. > At the top of each page I now do > > $reltoroot = preg_replace("|/[^/]+|", "../", dirname($_SERVER['PHP_SELF'])); > ini_set ("include_path",ini_get("include_path").":".$reltoroot."../include"); >

Re: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Tom Rogers
Thanks Chris Thats what I was after :) At the top of each page I now do $reltoroot = preg_replace("|/[^/]+|", "../", dirname($_SERVER['PHP_SELF'])); ini_set ("include_path",ini_get("include_path").":".$reltoroot."../include"); which takes care of the include path I use the path translated info

[PHP] Re: help condensing regular expressions

2002-04-05 Thread Chris Adams
In article <[EMAIL PROTECTED]>, Tom Rogers wrote: > I am trying to calculate how far into a directory structure I am so that I > can include images and include files without having to hard code them. > I need to turn $PHP_SELF which could be /admin/emails/index.php into ../../ > which I can then

RE: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Tom Rogers
lto:[EMAIL PROTECTED]] >Sent: Friday, April 05, 2002 2:33 PM >To: [EMAIL PROTECTED] >Subject: Re: [PHP] Re: help condensing regular expressions > > >Hi >Yes that would be fine for the html examples I gave but the real use is for >php to find the include directory which I

RE: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Collins, Robert
TED]] Sent: Friday, April 05, 2002 2:33 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: help condensing regular expressions Hi Yes that would be fine for the html examples I gave but the real use is for php to find the include directory which I keep out of the server tree, one directory back

Re: [PHP] Re: help condensing regular expressions

2002-04-05 Thread Tom Rogers
Hi Yes that would be fine for the html examples I gave but the real use is for php to find the include directory which I keep out of the server tree, one directory back like this include($relative_root."../include/mysql_connect.inc") Each domain has its own include directory which I want to ke

[PHP] Re: help condensing regular expressions

2002-04-05 Thread Julio Nobrega Trabalhando
How about: $site_root = '/www/user/htdocs/'; Instead of going relative, go from the root. Or you could put $site_root as your url: $site_root = 'http://www.your_site.com/'; -- Julio Nobrega. Um dia eu chego lá: http://sourceforge.net/projects/toca Ajudei? Salvei? Que tal um presentinh