Re: Path question

From: Date: Tue, 29 Mar 2011 18:41:57 +0000
Subject: Re: Path question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-312125@lists.php.net to get a copy of this message
On 3/28/11 8:18 PM, Jack wrote:
Hello All, Is there a smarter way to do includes by setting up a path or something where I don't have to include /home/domain.com/includes/include_file.php Apparently my path is as shown above, but I would prefer to just put in /includes/include_file.php
I wrote about this a long time ago ... perhaps it might help: http://www.dantescode.com/2007/10/10/evolution-of-php-coder-naming-classes/ Talks about putting your functions into classes and using the autoloader to avoid putting include statements in your code. Might not help if you are loading content which is not just PHP functions/code, but if you haven't "evolved" this far yet, the read might help you out. -- Dante

« previous php.general (#312125) next »