Conditions | 6 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | |||
37 | function __autoload($class) |
||
38 | { |
||
39 | $libs = './'; |
||
40 | $ext = '.php'; |
||
41 | $file = search_lib($libs, $class . $ext); |
||
|
|||
42 | // Se encontrou inclui o arquivo |
||
43 | if (false !== $file) { |
||
44 | require_once $file; |
||
45 | } |
||
46 | // Se não encontrar o arquivo lança um erro na tela. :) |
||
47 | else { |
||
48 | $msg = "Autoload fatal erro: Can't find the file {$class}!"; |
||
49 | error_log($msg); |
||
50 | exit('<br><br><strong>' . $msg . '</strong>'); |
||
51 | } |
||
52 | } |
||
53 |