1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
| <?php
/**
* Tutoriel file
* Description : Simple substitutions of variables
* You need PHP 5.2 at least
* You need Zip Extension or PclZip library
*
* @copyright GPL License 2008 - Julien Pauli - Cyril PIERRE de GEYER - Anaska (<a href="http://www.anaska.com" target="_blank">http://www.anaska.com</a>)
* @license <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">http://www.gnu.org/copyleft/gpl.html</a> GPL License
* @version 1.3
*/
// Make sure you have Zip extension or PclZip library loaded
// First : include the librairy
require_once ('/var/www/library/odf.php');
require '/var/www/library/zip/PclZipProxy.php';
require '/var/www/library/zip/PhpZipProxy.php';
require '/var/www/library/Segment.php';
$odf = new odf("/var/www/convention/odt.odt");
$odf->setVars('titre', 'PHP: Hypertext PreprocessorPHP: Hypertext Preprocessor');
$message = "PHP (sigle de PHP: Hypertext Preprocessor), est un langage de scripts libre
principalement utilisé pour produire des pages Web dynamiques via un serveur HTTP, mais
pouvant également fonctionner comme n'importe quel langage interprété de façon locale,
en exécutant les programmes en ligne de commande.";
$odf->setVars('message', $message);
// We export the file
$odf->exportAsAttachedFile();
?> |
Partager