Possible Duplicate:
PHP: Require() and Class Hierarchies
Is this bad practice?
Is there any actual difference between including them outside vs inside?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is no actual difference between including them outside or inside a class.
Usually, the first start-up scripts are included outside classes since no class is available yet.
Later, with respect to the OOP design, you could create a class for managing the imports of other files (possible other PHP classes or templates) which has its benefits: you define a base path for all files so you can import easily what you need, increase security by invoking scripts only through your mechanism etc.