According to a PHP blog post, yes this is exactly the way that it should be done. Even w3schools (whom you normally shouldn't trust too much since they're not related to the real w3 at all) recommends it.
I like that you are using require
instead of include
. I am not so sure if you really need the _once
though.
I recommend you read the documentation of the include function the documentation of the include function (which also applies to require, require_once and include_once) to make sure that you really are aware of how it works. Note that if you are using any PHP scripts inside the included files, any global variables (which you should try avoid using too many of overall) also gets included to the calling script.
According to a PHP blog post, yes this is exactly the way that it should be done. Even w3schools (whom you normally shouldn't trust too much since they're not related to the real w3 at all) recommends it.
I like that you are using require
instead of include
. I am not so sure if you really need the _once
though.
I recommend you read the documentation of the include function (which also applies to require, require_once and include_once) to make sure that you really are aware of how it works. Note that if you are using any PHP scripts inside the included files, any global variables (which you should try avoid using too many of overall) also gets included to the calling script.
According to a PHP blog post, yes this is exactly the way that it should be done. Even w3schools (whom you normally shouldn't trust too much since they're not related to the real w3 at all) recommends it.
I like that you are using require
instead of include
. I am not so sure if you really need the _once
though.
I recommend you read the documentation of the include function (which also applies to require, require_once and include_once) to make sure that you really are aware of how it works. Note that if you are using any PHP scripts inside the included files, any global variables (which you should try avoid using too many of overall) also gets included to the calling script.
According to a PHP blog post, yes this is exactly the way that it should be done. Even w3schools (whom you normally shouldn't trust too much since they're not related to the real w3 at all) recommends it.
I like that you are using require
instead of include
. I am not so sure if you really need the _once
though.
I recommend you read the documentation of the include function (which also applies to require, require_once and include_once) to make sure that you really are aware of how it works. Note that if you are using any PHP scripts inside the included files, any global variables (which you should try avoid using too many of overall) also gets included to the calling script.