get.php 365 B

123456789101112131415161718
  1. <?php
  2. declare(strict_types=1);
  3. require 'autoload.php';
  4. $captchaType = @$_REQUEST['captchaType'];
  5. if (!in_array($captchaType, ['clickWord', 'blockPuzzle'])) {
  6. throw new Exception('缺少参数:captchaType');
  7. }
  8. $controllerName = ucfirst($captchaType) . 'Controller';
  9. require $controllerName . '.php';
  10. $controller = new $controllerName;
  11. $controller->get();