Best way to include? Include paths?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
toasty2
Forum Contributor
Posts: 361
Joined: Wed Aug 03, 2005 10:28 am
Location: Arkansas, USA

Best way to include? Include paths?

Post by toasty2 »

I've got a PHP project where (obviously) I need to include other scripts. They are in the same directory. Should I just do include 'file.php' or should I be manipulating the include path or including with a full path?
www.WeAnswer.IT
Forum Newbie
Posts: 24
Joined: Wed Mar 19, 2008 6:33 pm

Re: Best way to include? Include paths?

Post by www.WeAnswer.IT »

Just including 'file.php' is fine. You can change the default include path that PHP uses later, if your include directory moves.
Post Reply