The original PHP version of the Model Railroad RFID interface written by Richard Cagle in 2017 for the KCS 3rd Sub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.php 1.3KB

  1. <?php
  2. /*
  3. ._--_--_--___--_--_____-__________
  4. ||_________,-------' |-----|=-
  5. || KCS 3RD SUB | [|] |____.
  6. || ___| |__ ||
  7. |_|====================/===|_____|==\=|_|
  8. |_|/[o]=[o]=[o] |_______| [o]=[o]=[o]\|_|
  9. ===========================================================
  10. RFID Manager v1.0
  11. Richard Cagle
  12. */
  13. if (version_compare(PHP_VERSION, '7.0', '<')){
  14. die('Your host needs to use PHP 7.0 or higher!'); // Who's excited about PHP 7.0?
  15. }
  16. error_reporting(-1);
  17. ini_set("display_errors", 1);
  18. /**
  19. * Constant that is checked in included files to prevent direct access.
  20. */
  21. define('_RFIDAPP', 1);
  22. define('RFID_ROOT', __DIR__);
  23. define("DS", DIRECTORY_SEPARATOR); // Portability
  24. if (!file_exists(RFID_ROOT . DS . 'app' . DS . 'defines.php')) {
  25. die( 'Could not find application definitions.' );
  26. }
  27. // curl_setopt($ch, CURLOPT_CAINFO, RFID_ROOT . DS . 'cacert.pem');
  28. // curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
  29. include_once RFID_ROOT . DS . 'app' . DS . 'defines.php'; // This hold all our define statements
  30. require_once RFID_APP . DS . 'framework.php'; // Include Framework File
  31. $application = new Framework(); // Get the core framework application
  32. APP::set('framework', $application); // Save a reference
  33. $application->init(); // Go.
  34. ?>