File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
5151PI::joinPath("myapp/", "/dist/app.zip"); //returns "myapp/dist/app.zip"
@@ -67,7 +67,7 @@ require_once "./../vendor/tomaskraus/php-includer/piLoader.php";
6767echo $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
9292From 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