File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ echo $pi->path(); //echoes "/var/www/myapp/"
45
45
$pi->path("conf/file-to-be-created.php"); //returns "/var/www/myapp/conf/file-to-be-created.php".
46
46
47
47
//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
49
49
50
50
//smart path join, fixes missing or too many separators
51
51
PI::joinPath("myapp/", "/dist/app.zip"); //returns "myapp/dist/app.zip"
@@ -67,7 +67,7 @@ require_once "./../vendor/tomaskraus/php-includer/piLoader.php";
67
67
echo $pi->path(); //echoes "/var/www/myapp/"
68
68
69
69
//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
71
71
72
72
```
73
73
@@ -86,7 +86,7 @@ if (file_exists($autoLoaderFile)) {
86
86
}
87
87
88
88
//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
90
90
```
91
91
92
92
From the previous examples, ` ./pi.global.php ` will be included in both ` ./index.php and ` ` ./login/index.php ` files.
You can’t perform that action at this time.
0 commit comments