@title@

@in1@

@naslov@

@sentenca@

@obrazlozenja@

@sadrzaj@

@in2@

"; $string.= str_replace($replacement, $width, $var); return $string; } //funkcija koja upisuje string u fajl function writeContent($path,$string){ if (!$handle = fopen($path, 'w')) { echo "Cannot open file ($path)"; exit; } if (fwrite($handle, $string) === FALSE) { echo "Cannot write to file ($path)"; exit; } fclose($handle); } //iscitavam fajl word.doc u kome s enalazi tekst pisan cirilicom $width=getContent("word.doc"); //zamena $string=replace("@sadrzaj@", $width); //upis u fajl page1.html writeContent("page1.html",$string); echo "Done" ; ?>