Hi.
I am trying to create a file for a user to download which includes formatting.
The text to be put into the file is represented by the variable $content which could for example look like this:
$content="<b>Text</b> - <i>More</i>";
My problem is that using this code, the output doesn't format the text using the tags. It just puts the tags into the document.
$type="text/plain";
$name="output.rtf";
$content=$_POST['output'];
$size=strlen($content);
header("Content-Disposition: attachment; filename=".$name);
header("Content-length: ".$size);
header("Content-type: ".$type);
echo $content;
Any help with this would be most appreciated 🙂
Thanks,
Matt