here is the code code below
class Home extends Public_Controller
{
/**
* Constructor method
*`enter code here`
* @author PyroCMS Dev Team
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
}
public function testimg(){
header("Content-type: image/png");
$image = imagecreatetruecolor(200, 200);
imagepng($image);
}
}
but when i call this controller like (http://localhost/sitename/home/testimg). i got the error below
The image "http://localhost/sitename/home/testimg" cannot be displayed because it contains errors.
Kindly help me with this issue i am new to pyrocms.
That's nothing to do with PyroCMS or even CodeIgniter, you've just set up the image wrong. That is a generic PHP error.