public function index() { $validateCode = new ValidateCode(); $validateCode->outputCodeImg(); $_SESSION['code'] = $validateCode->getCode(); }