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
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
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
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
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
>
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
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
7 matches
Mail list logo