Categories > TinyButStrong general >

Problem download html file

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: miki89
Date: 2015-08-26
Time: 19:21

Problem download html file

Hi to everybody,
I have a problem with TBS. I need to create an html document and download that. I use this script but it only shows the html text but no download the file. I use OPENTBS_FILE but it doesn't work too but they work when i create a word page.

$TBS = new clsTinyButStrong;
global $message;
$message='<p>hi to everybody</p>';

$out = 'document.html';

And this is the template:


Thanks and regards.
By: Skrol29
Date: 2015-08-26
Time: 23:30

Re: Problem download html file

Hi Miki89

OpenTBS cannot manage HTML files. It is done to manage binary files that are in fact a zip archive. That is the case with Ms Office and Libre Office documents.

In order to make a download with you HTML result then you have to use TBS alone, and ends the merging with $TBS->Show(TBS_NOTHING)
Then you have to perform an HTML download using PHP, the result of the merge is given by the property $TBS->Source