For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > July 2004 > Re: Frustrated with PHP?s "include"









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Frustrated with PHP?s "include"
Tomislav Petrovic

2004-07-26, 8:57 am

I think the best way to deal with this is to define
global constant like ROOT_PATH which
contains full path to your root folder and then
always use includes like this
include ("../definitions.inc") // contains definition of ROOT_PAHT
// and is only incude having
relative path
include (ROOT_PATH . "/dir1/dir2/include.php")...
when you install your script on web server you only need to
define ROOT_PATH.....

Tomy.

Edward Alfert wrote:
> eclipsboi <eclipsboi@hotmail.com> wrote in
> news:e4p5g05r3256nm9fa2d8gosf29bnrsk6ip@
4ax.com:
>
>
>
> I like your .htaccess entry, but how does it impact performance of the
> webserver or delay of processing php scripts?
>
> Have you notice and degradation in performance?



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com