I learned of the function set_include_path(). All this time, I defined a constant in the config.php file
define(\'BASE_PATH\', \'/var/www/mywebsite/public_html/
I think Micahel's explanation is very clear.
I recommended you to use "set_include_path" when you store all your PHP files in an folder, for example: "libs/" (its easier). Using the define() method should be faster as you are specifying the file path explicitly.
Always try to avoid to use absolute paths unless they are really necessary. I found very useful to specify your paths this way:
define("BASE_PATH", dirname(__FILE__));
This way you will avoid to have to update the path each time you move the code.