One thing I never really understood is the difference between require_once and include_once.... they both seem to include the file anyways.
So to answer your question about the problem, you should do what hielo says, i.e. using require_once() / include_once()
hielo
>>One thing I never really understood is the difference between require_once and include_once
You need to understand the differenct between include and require, which is very well documented on the php site:
require() includes and evaluates a specific file. Detailed information on how this inclusion works is described in the documentation for include().
require() and include() are identical in every way except how they handle failure. They both produce a Warning, but require() results in a Fatal Error. In other words, don't hesitate to use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless.
As for the require_once and include_once, they behave the same as the require and include except that a file will be "imported" at most once.
So to answer your question about the problem, you should do what hielo says, i.e. using require_once() / include_once()