ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
17html.php
Go to the documentation of this file.
1<?php
29error_reporting(E_ALL);
30ini_set('display_errors', TRUE);
31ini_set('display_startup_errors', TRUE);
32date_default_timezone_set('Europe/London');
33
34define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
35
36date_default_timezone_set('Europe/London');
37
38include "05featuredemo.inc.php";
39
41require_once dirname(__FILE__) . '/../Classes/PHPExcel/IOFactory.php';
42
43
44echo date('H:i:s') , " Write to HTML format" , EOL;
45$callStartTime = microtime(true);
46
48$objWriter->setSheetIndex(0);
49//$objWriter->setImagesRoot('http://www.example.com');
50$objWriter->save(str_replace('.php', '.htm', __FILE__));
51$callEndTime = microtime(true);
53echo date('H:i:s') , " File written to " , str_replace('.php', '.htm', pathinfo(__FILE__, PATHINFO_BASENAME)) , EOL;
54echo 'Call time to write Workbook was ' , sprintf('%.4f',$callTime) , " seconds" , EOL;
55// Echo memory usage
56echo date('H:i:s') , ' Current memory usage: ' , (memory_get_usage(true) / 1024 / 1024) , " MB" , EOL;
57
58
59// Echo memory peak usage
60echo date('H:i:s') , " Peak memory usage: " , (memory_get_peak_usage(true) / 1024 / 1024) , " MB" , EOL;
61
62// Echo done
63echo date('H:i:s') , " Done writing file" , EOL;
64echo 'File has been created in ' , getcwd() , EOL;
$objPHPExcel
memory_get_peak_usage(true)/1024/1024)
Definition: 17html.php:60
const EOL
Definition: 17html.php:34
$callEndTime
Definition: 17html.php:51
$callTime
Definition: 17html.php:52
$callStartTime
Definition: 17html.php:45
memory_get_usage(true)/1024/1024)
Definition: 17html.php:56
$objWriter
Definition: 17html.php:47
sprintf('%.4f', $callTime)
Definition: 17html.php:54
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
static createWriter(PHPExcel $phpExcel, $writerType='')
Create PHPExcel_Writer_IWriter.
Definition: IOFactory.php:132