Robie cos takiego:
<?php $controller = $_POST['controller]; $file = "{$controller}DB.php"; if (is_file($file)) { require_once $file; if (class_exists("{$controller}DB")) { $db = "{$controller}DB::singleton"; $db(); } } ?>
Niestety to nie dziala i wyrzuca blad:
Fatal error: Class 'npDB::singleton' not found in....
Nadmienie tylko ze jesli tworze nowy obiekt klasy (new $db) wszystko jest ok
Macie jakies pomysly jak rozwiazac moj problem ?