Mandatory:
- PHP 5.3+
- PHP Zip extension
- PHP XML Parser extension
Optional PHP extensions:
There are two ways to install PHPPresentation, i.e. via Composer or manually by downloading the library.
To install via Composer, add the following lines to your
composer.json
:
{
"require": {
"phpoffice/phppresentation": "dev-master"
}
}
To install manually, download PHPOfficePHPPresentation package from GitHub and download PHPOfficeCommon package from GitHub. Extract the package and put the contents to your machine.
require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
\PhpOffice\PhpPresentation\Autoloader::register();
require_once 'path/to/PhpOffice/Common/src/Common/Autoloader.php';
\PhpOffice\Common\Autoloader::register();
After installation, you can browse and use the samples that we've
provided, either by command line or using browser. If you can access
your PHPPresentation library folder using browser, point your browser to the
samples
folder, e.g. http://localhost/PhpPresentation/samples/
.