Advertisement
jargon

Linedancer (LD4) :: "UI/Gamepad/Available Gamepads.php"

Jan 10th, 2025
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | Gaming | 0 0
  1. <?php
  2. // Linedancer (LD4) :: "UI/Gamepad/Available Gamepads.php"
  3.  
  4. error_reporting(E_ALL);
  5. ini_set('display_errors', 1);
  6.  
  7. include_once("{$_SERVER['DOCUMENT_ROOT']}/LD4/Linedancer/scripts/php/IO/Directory Tree.php");
  8.  
  9. try {
  10.     $DirectoryTree = new DirectoryTreeClass();
  11.  
  12.     $path = "/LD4/Linedancer/scripts/json/UI/Gamepad/Config/";
  13.     $includeFiles = true; //
  14.     $maxDepth = 0;
  15.     $wildcard = null; // "*.json";
  16.    
  17.     $directoryTree = $DirectoryTree->generateTree($path, $includeFiles, $maxDepth, $wildcard);
  18.  
  19.     header('Content-Type: application/json');
  20.     echo json_encode($directoryTree, JSON_PRETTY_PRINT);
  21.     die();
  22. } catch (Exception $e) {
  23.    
  24.     header('Content-Type: application/json');
  25.     echo json_encode([], JSON_PRETTY_PRINT);
  26.     die();
  27. }
  28.  
  29. ?>
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement