installing.rst 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .. _setup:
  2. Installing/configuring
  3. ======================
  4. Requirements
  5. ------------
  6. Mandatory:
  7. - PHP 5.3+
  8. - PHP `Zip <http://php.net/manual/en/book.zip.php>`__ extension
  9. - PHP `XML
  10. Parser <http://www.php.net/manual/en/xml.installation.php>`__
  11. extension
  12. Optional PHP extensions:
  13. - `XMLWriter <http://php.net/manual/en/book.xmlwriter.php>`__
  14. Installation
  15. ------------
  16. There are two ways to install PHPPresentation, i.e. via
  17. `Composer <http://getcomposer.org/>`__ or manually by downloading the
  18. library.
  19. Using Composer
  20. ~~~~~~~~~~~~~~
  21. To install via Composer, add the following lines to your
  22. ``composer.json``:
  23. .. code-block:: json
  24. {
  25. "require": {
  26. "phpoffice/phppresentation": "dev-master"
  27. }
  28. }
  29. Manual install
  30. ~~~~~~~~~~~~~~
  31. To install manually, `download PHPOffice\PHPPresentation package from
  32. GitHub <https://github.com/PHPOffice/PHPPresentation/archive/master.zip>`__
  33. and `download PHPOffice\Common package from
  34. GitHub <https://github.com/PHPOffice/Common/archive/master.zip>`__.
  35. Extract the package and put the contents to your machine.
  36. .. code-block:: php
  37. require_once 'path/to/PhpPresentation/src/PhpPresentation/Autoloader.php';
  38. \PhpOffice\PhpPresentation\Autoloader::register();
  39. require_once 'path/to/PhpOffice/Common/src/Common/Autoloader.php';
  40. \PhpOffice\Common\Autoloader::register();
  41. Using samples
  42. -------------
  43. After installation, you can browse and use the samples that we've
  44. provided, either by command line or using browser. If you can access
  45. your PHPPresentation library folder using browser, point your browser to the
  46. ``samples`` folder, e.g. ``http://localhost/PhpPresentation/samples/``.