I am getting this error:
Warning: Cannot modify header information - headers already sent by (output started at E:\www\dev\elearning1\WebProjects\elearning\public\test.php:1) in E:\www\dev\elearning1\WebProjects\elearning\public\test.php on line 3
This is my entire PHP file:
<?php
header('Content-Type: text/html; charset=utf-8');
// set the include path
set_include_path(dirname(__FILE__).'/../../../WebLibThirdParty/Zend/library');
function __autoload($class) {
require_once(str_replace('_', '/', $class) . '.php');
}
// Create new PDF
$pdf = new Zend_Pdf();
$page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
// Set font
$page->setFont(Zend_Pdf_Font::fontWithPath('times.ttf'), 12);
// Draw text
$string = 'škola volá';
$page->drawText($string, 200, 643, 'UTF-8');
$pdf->pages[] = $page;
$pdf->save('test.pdf');
As you can see, I am not seding any output to the browser anywhere so why do I get that error?