[PHP] Re: PHP Website Architecture

2004-05-07 Thread Kim Steinhaug
Well if you really want to do it the perfect way, I would recommend using only one PHP file to generate the whole site. Or if you like, have one file with all the functions. You should also read into classess and create most of the functions as classess. To do the error handling there are many wa

Re: [PHP] Website Architecture

2004-02-05 Thread joel boonstra
On Thu, Feb 05, 2004 at 05:42:54PM -0500, joel boonstra wrote: > # ini_set(): > ini_set('include_path', "{$_SERVER['DOCUMENT_ROOT']}:."); Replying to myself, it appears that PHP >= 4.3.0 has a family of functions specifically for tweaking include_path: http://www.php.net/manual/en/function

Re: [PHP] Website Architecture

2004-02-05 Thread joel boonstra
On Thu, Feb 05, 2004 at 04:35:14PM -0600, John Nichel wrote: > And if document root is different from include path? What if the > include path is outside of document root? You CANNOT rely on > include_path to accomplish this. Sorry, I should have been more specific. I was implying that you w

Re: [PHP] Website Architecture

2004-02-05 Thread John Nichel
joel boonstra wrote: On Thu, Feb 05, 2004 at 09:48:22PM +, Stuart wrote: Eric Gorr wrote: A solution I found was in dirA/index.php, to chdir( ".." ); before the require_once, which moves the current directory to SiteRootDir and allows otherfuncs.php to be found ... is this the best way to s

Re: [PHP] Website Architecture

2004-02-05 Thread joel boonstra
On Thu, Feb 05, 2004 at 09:48:22PM +, Stuart wrote: > Eric Gorr wrote: > >A solution I found was in dirA/index.php, to chdir( ".." ); before > >the require_once, which moves the current directory to SiteRootDir and > >allows otherfuncs.php to be found ... is this the best way to solve this >

Re: [PHP] Website Architecture

2004-02-05 Thread Stuart
Eric Gorr wrote: A solution I found was in dirA/index.php, to chdir( ".." ); before the require_once, which moves the current directory to SiteRootDir and allows otherfuncs.php to be found ... is this the best way to solve this problem? Qualify relative paths by prepending $_SERVER['DOCUMENT_ROOT

RE: [PHP] Website Architecture

2004-02-05 Thread Shaunak Kashyap
The best way, IMHO, is to use absolute paths (from docroot, of course) whenever you include or require files. The same logic can be applied to the related problem of links. Shaunak > -Original Message- > From: Eric Gorr [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 05, 2004 4:35 PM