Skip to content

Commit 6bae3a1

Browse files
committed
doc: path fix
1 parent 81a5718 commit 6bae3a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ echo $pi->path(); //echoes "/var/www/myapp/"
4545
$pi->path("conf/file-to-be-created.php"); //returns "/var/www/myapp/conf/file-to-be-created.php".
4646

4747
//path-safe include, wherever you are
48-
include $pi->path("myLib/utils.php"); //includes /var/www/myapp/conf/utils.php
48+
include $pi->path("myLib/utils.php"); //includes /var/www/myapp/myLib/utils.php
4949

5050
//smart path join, fixes missing or too many separators
5151
PI::joinPath("myapp/", "/dist/app.zip"); //returns "myapp/dist/app.zip"
@@ -67,7 +67,7 @@ require_once "./../vendor/tomaskraus/php-includer/piLoader.php";
6767
echo $pi->path(); //echoes "/var/www/myapp/"
6868

6969
//path-safe include, wherever you are (now we are in the "login" subdirectory)
70-
include $pi->path("myLib/utils.php"); //includes /var/www/myapp/conf/utils.php
70+
include $pi->path("myLib/utils.php"); //includes /var/www/myapp/myLib/utils.php
7171

7272
```
7373

@@ -86,7 +86,7 @@ if (file_exists($autoLoaderFile)) {
8686
}
8787

8888
//here you can already use a php-includer object, it is already included
89-
include $pi->path("conf/config.php");
89+
include $pi->path("conf/config.php"); //includes /var/www/myapp/conf/config.php
9090
```
9191

9292
From the previous examples, `./pi.global.php` will be included in both `./index.php and` `./login/index.php` files.

0 commit comments

Comments
 (0)