It is very often to include another file as a part of your script.

require_once("/path"/to/file.php");

When do this kind of including, should be very careful on following parts.
1) The path to the script is wrong.
2) The path to the script is correct, but the script is in a forbidden directory.
3) The include file has a blank line or space before or after the code in the PHP script.
It is very easy to omit the space after the code.
4) The include file can be viewd by non-PHP methods.
5) You’re in include overload.
6) You are using unchecked variables as include filenames.
It may make your site unsafe in some situation.
The tips of including file are learned from “Wicked Cool PHP”

David Yin

David is a blogger, geek, and web developer — founder of FreeInOutBoard.com. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *