Skip to content

Commit c6fc1d4

Browse files
committed
Moved the autoloader in the basic usage to the installation section in the read me
1 parent 75a6729 commit c6fc1d4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

+11-4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ With PHPWord, you can create DOCX, ODT, or RTF documents dynamically using your
2929
* Use XSL 1.0 style sheets to transform main document part of OOXML template
3030
* ... and many more features on progress
3131

32+
__Want to contribute?__ [Fork us](https://github.com/PHPOffice/PHPWord/fork) or [submit](https://github.com/PHPOffice/PHPWord/issues) your bug reports or feature requests to us.
33+
3234
## Requirements
3335
* PHP 5.3+
3436
* PHP [Zip](http://php.net/manual/en/book.zip.php) extension
@@ -52,14 +54,19 @@ the following lines to your ``composer.json``.
5254
}
5355
```
5456

57+
Alternatively, you can download the latest release from the [releases page](https://github.com/PHPOffice/PHPWord/releases).
58+
In this case, you will have to register the autoloader.
59+
60+
```php
61+
require_once 'path/to/PhpWord/src/PhpWord/Autoloader.php';
62+
PhpOffice\PhpWord\Autoloader::register();
63+
```
64+
5565
## Basic usage
5666

5767
The following is a basic example of the PHPWord library. More examples are provided in the [samples folder](samples/).
5868

5969
```php
60-
require_once 'src/PhpWord/Autoloader.php';
61-
PhpOffice\PhpWord\Autoloader::register();
62-
6370
$phpWord = new \PhpOffice\PhpWord\PhpWord();
6471

6572
// Every element you want to append to the word document is placed in a section.
@@ -99,6 +106,6 @@ $objWriter = \PhpOffice\PhpWord\IOFactory::createWriter($phpWord, 'RTF');
99106
$objWriter->save('helloWorld.rtf');
100107
```
101108

102-
__Want to contribute?__ [Fork us](https://github.com/PHPOffice/PHPWord/fork) or [submit](https://github.com/PHPOffice/PHPWord/issues) your bug reports or feature requests to us.
109+
## Documentation
103110

104111
__Want to know more?__ Read the full documentation of PHPWord on [Read The Docs](http://phpword.readthedocs.org/).

0 commit comments

Comments
 (0)