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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to