test_debug.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', 1);
  4. echo "Starting test...\n";
  5. // Include all necessary files
  6. $traitsPath = __DIR__ . '/api/functions/';
  7. $homepagePath = __DIR__ . '/api/homepage/';
  8. // Get all trait files
  9. $traitFiles = glob($traitsPath . '*.php');
  10. $homepageFiles = glob($homepagePath . '*.php');
  11. echo "Loading trait files...\n";
  12. foreach ($traitFiles as $file) {
  13. echo "Including: " . basename($file) . "\n";
  14. include_once $file;
  15. }
  16. echo "Loading homepage files...\n";
  17. foreach ($homepageFiles as $file) {
  18. echo "Including: " . basename($file) . "\n";
  19. include_once $file;
  20. }
  21. echo "Loading main class...\n";
  22. include_once __DIR__ . '/api/classes/organizr.class.php';
  23. echo "Creating instance...\n";
  24. try {
  25. $organizr = new Organizr();
  26. echo "SUCCESS: Class instantiated successfully!\n";
  27. } catch (Throwable $e) {
  28. echo "ERROR: " . $e->getMessage() . "\n";
  29. echo "File: " . $e->getFile() . "\n";
  30. echo "Line: " . $e->getLine() . "\n";
  31. echo "Trace:\n" . $e->getTraceAsString() . "\n";
  32. }