You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function my_autoloader($class) {
include 'classes/' . $class . '.class.php';
}
For every include that fail, will generate a warning and increase your log. If you have 4 functions (methods,..) registered using include directly, will create 4 warnings for every request.
It is worse with require, that create a fatal error and stop the execution.
It 's a shame than spl_autoload_register don't work like include_path, that try every path and show the error if all fail.
The text was updated successfully, but these errors were encountered:
In https://github.com/dseguy/clearPHP/blob/master/rules/use-smart-autoload.md example:
function my_autoloader($class) {
include 'classes/' . $class . '.class.php';
}
For every include that fail, will generate a warning and increase your log. If you have 4 functions (methods,..) registered using include directly, will create 4 warnings for every request.
It is worse with require, that create a fatal error and stop the execution.
It 's a shame than spl_autoload_register don't work like include_path, that try every path and show the error if all fail.
The text was updated successfully, but these errors were encountered: