a função fread dá o erro
Fatal error: Uncaught TypeError: fread(): Argument #1 ($stream) must be of type resource
$modelo = “templates\modelo_contrato.rtf”;
$handle = fopen($modelo,“r”);
$mensagem=fread($handle,filesize($modelo));
fclose($handle);