Skip to content

Commit 7aeb1ca

Browse files
committed
add usage instruction (composer and stand alone)
1 parent 4e1b40c commit 7aeb1ca

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ Once again, all credits to Olivier Plathey for providing an easy to use extensio
1313
# Version
1414
Based on version 2.9 (2017-05-11) available from http://www.fpdf.org/en/script/script93.php
1515

16+
# Usage
17+
## Composer (autoload)
18+
As this package specifies autoloading information, you can [autoload](https://getcomposer.org/doc/01-basic-usage.md#autoloading) all the dependencies by adding this to your code:
19+
20+
`require 'vendor/autoload.php';`
21+
22+
## Standalone Script
23+
Load the class file by calling
24+
25+
`require_once '/abolute/path/to/fpdm.php';`
26+
27+
or
28+
29+
`require_once './relative/path/to/fpdm.php';`
30+
31+
1632
# Original Info Page
1733
## Information
1834
Author: Olivier
@@ -44,8 +60,6 @@ This example shows how to merge data from an array:
4460
Sample using a PHP array
4561
****************************/
4662

47-
require('fpdm.php');
48-
4963
$fields = array(
5064
'name' => 'My name',
5165
'address' => 'My address',

0 commit comments

Comments
 (0)