verification.php 375 B

12345678910111213141516171819
  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->verification();