By: yizen
Date: 2015-01-24
Time: 07:40
|
why the opentbs download doxc file is null?
hello,I have a problem. why the opentbs download doxt file is null?
the code of word.php.
<?php
// Include classes
include_once('tbs_class.php'); // Load the TinyButStrong template engine
include_once('tbs_plugin_opentbs.php'); // Load the OpenTBS plugin
// prevent from a PHP configuration problem when using mktime() and date()
if (version_compare(PHP_VERSION,'5.1.0')>=0) {
if (ini_get('date.timezone')=='') {
date_default_timezone_set('UTC');
}
}
// Initialize the TBS instance
$TBS = new clsTinyButStrong; // new instance of TBS
$TBS->Plugin(TBS_INSTALL, OPENTBS_PLUGIN); // load the OpenTBS plugin
// -----------------
// Load the template
// -----------------
$template = $_SERVER['DOCUMENT_ROOT'].'/doc/doc/gfwx.docx';
$TBS->LoadTemplate($template, OPENTBS_ALREADY_UTF8); // Also merge some [onload] automatic fields (depends of the type of document).
// -----------------
// Output the result
// -----------------
if ($yourname =='') $yourname = "(no name)";
$TBS->PlugIn(OPENTBS_DEBUG_XML_CURRENT);
$TBS->PlugIn(OPENTBS_DEBUG_INFO);
// -----------------
// Output the result
// -----------------
//$file_name = str_replace('.', '_'.date('Y-m-d').$save_as.'.', $template);
$file_name = 'export';
$TBS->Show(OPENTBS_FILE, $file_name . '.docx');
?>
but the output is:
* OPENTBS DEBUG MODE: if the star, (*) on the left before the word OPENTBS, is not the very first character of this page, then your
merged Document will be corrupted when you use the OPENTBS_DOWNLOAD option. If there is a PHP error message, then you have to fix it.
If they are blank spaces, line beaks, or other unexpected characters, then you have to check your code in order to avoid them.
------------------------------
INFORMATION
------------------------------
* Debug command: OPENTBS_DEBUG_XML_CURRENT
* OpenTBS version: 1.9.3
* TinyButStrong version: 3.9.0
* PHP version: 5.2.17YES
* Opened document: D:/www/default/doc/doc/gfwx.docx
* Activated features for document type: openxml/docx
* Deleted files in the archive: none
* Added files in the archive: none
* Modified files in the archive:
- word/document.xml
------------------------------
File merged with OpenTBS: word/document.xml
------------------------------
|