Skip to content

Commit 6b7abe8

Browse files
committed
Updated README.md
1 parent 19b5e0d commit 6b7abe8

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,27 @@ It can be used with Webservers (NanoHTTPD, Java HttpServer, etc...) or as a part
88
- Supports all HTTP methods and headers
99
- Custom error handling via `Consumer<Exception>`
1010
- Compatible with PHP-FPM or `php-cgi` command
11-
-
11+
1212
### How to use
13-
- Import JavaPHP to your project.
13+
- Download the source code and build it and import it <strong>OR</strong> import it directly from my maven repository like this:
14+
15+
```xml
16+
<repositories>
17+
<repository>
18+
<id>breadeatercdn</id>
19+
<url>https://cdn.breadeater.fr/maven</url>
20+
</repository>
21+
</repositories>
22+
23+
<dependencies>
24+
<dependency>
25+
<groupId>fr.breadeater</groupId>
26+
<artifactId>javaphp</artifactId>
27+
<version>2.1.1</version>
28+
</dependency>
29+
</dependencies>
30+
```
31+
1432
- If not using PHP FPM, start a PHP FastCGI server using:
1533

1634
```text
@@ -40,7 +58,7 @@ public class JavaPHPTest {
4058

4159
// Specifies the options that will be used when running a PHP file
4260
// Note: The location of the PHP file is the same location as the PHP-CGI / PHP-FPM working directory, same for Document Root
43-
JavaPHP.RunOptions options = new JavaPHP.RunOptions()
61+
JavaPHP.Options options = new JavaPHP.Options()
4462
.setPHPDocumentRoot(new File("./").getAbsolutePath())
4563
.setPHPFilepath(new File("./index.php").getAbsolutePath())
4664
.setPHPServerSoftwareName("Java") // Sets the Server Software name (e.g Apache, Nginx, etc...)

0 commit comments

Comments
 (0)