public function index() { $view = $this->getView(); $req = $this->getPageRequest(); // This will tell the system not to actually output anything. $view->record = false; $view->contenttype = 'image/png'; $view->mode = View::MODE_NOOUTPUT; $captcha = new SimpleCaptcha(); $captcha->createImage(); }
<?php error_reporting(E_ALL); ini_set('display_errors', 1); require 'Captcha.php'; $captcha = new SimpleCaptcha(); $captcha->createImage();