Merge branch 'develop' of https://github.com/PHPOffice/PHPWord.git into develop
This commit is contained in:
commit
9e99080777
|
|
@ -13,7 +13,7 @@ vertically.
|
|||
|
||||
$imageStyle = array(
|
||||
'width' => 40,
|
||||
'height' => 40
|
||||
'height' => 40,
|
||||
'wrappingStyle' => 'square',
|
||||
'positioning' => 'absolute',
|
||||
'posHorizontalRel' => 'margin',
|
||||
|
|
|
|||
|
|
@ -6,13 +6,13 @@ use PhpOffice\PhpWord\Autoloader;
|
|||
use PhpOffice\PhpWord\Settings;
|
||||
use PhpOffice\PhpWord\IOFactory;
|
||||
|
||||
error_reporting(E_ALL & ~E_DEPRECATED);
|
||||
error_reporting(E_ALL);
|
||||
define('CLI', (PHP_SAPI == 'cli') ? true : false);
|
||||
define('EOL', CLI ? PHP_EOL : '<br />');
|
||||
define('SCRIPT_FILENAME', basename($_SERVER['SCRIPT_FILENAME'], '.php'));
|
||||
define('IS_INDEX', SCRIPT_FILENAME == 'index');
|
||||
|
||||
require_once '../src/PhpWord/Autoloader.php';
|
||||
require_once __DIR__ . '/../src/PhpWord/Autoloader.php';
|
||||
Autoloader::register();
|
||||
Settings::loadConfig();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,13 @@
|
|||
<?php
|
||||
include_once 'Sample_Header.php';
|
||||
$requirements = array(
|
||||
'php' => array('PHP 5.3.0', version_compare(phpversion(), '5.3.0', '>=')),
|
||||
'xml' => array('PHP extension XML', extension_loaded('xml')),
|
||||
'zip' => array('PHP extension ZipArchive (optional)', extension_loaded('zip')),
|
||||
'gd' => array('PHP extension GD (optional)', extension_loaded('gd')),
|
||||
'xmlw' => array('PHP extension XMLWriter (optional)', extension_loaded('xmlwriter')),
|
||||
'xsl' => array('PHP extension XSL (optional)', extension_loaded('xsl')),
|
||||
);
|
||||
if (!CLI) {
|
||||
?>
|
||||
<div class="jumbotron">
|
||||
|
|
@ -11,20 +19,22 @@ if (!CLI) {
|
|||
</p>
|
||||
</div>
|
||||
<?php
|
||||
$requirements = array(
|
||||
'php' => array('PHP 5.3.0', version_compare(phpversion(), '5.3.0', '>=')),
|
||||
'zip' => array('PHP extension ZipArchive', extension_loaded('zip')),
|
||||
'xml' => array('PHP extension XML', extension_loaded('xml')),
|
||||
'gd' => array('PHP extension GD (optional)', extension_loaded('gd')),
|
||||
);
|
||||
echo "<h3>Requirements</h3>";
|
||||
echo "<ul>";
|
||||
foreach ($requirements as $key => $value) {
|
||||
$status = $value[1] ? 'passed' : 'failed';
|
||||
echo "<li>{$value[0]} ... <span class='{$status}'>{$status}</span></li>";
|
||||
}
|
||||
echo "</ul>";
|
||||
}
|
||||
if (!CLI) {
|
||||
echo "<h3>Requirement check:</h3>";
|
||||
echo "<ul>";
|
||||
foreach ($requirements as $key => $value) {
|
||||
list($label, $result) = $value;
|
||||
$status = $result ? 'passed' : 'failed';
|
||||
echo "<li>{$label} ... <span class='{$status}'>{$status}</span></li>";
|
||||
}
|
||||
echo "</ul>";
|
||||
include_once 'Sample_Footer.php';
|
||||
} else {
|
||||
echo 'Requirement check:' . PHP_EOL;
|
||||
foreach ($requirements as $key => $value) {
|
||||
list($label, $result) = $value;
|
||||
$status = $result ? '32m passed' : '31m failed';
|
||||
echo "{$label} ... \033[{$status}\033[0m" . PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue