I try to include some PHP file to another one by using include
function.
It works fine when files are at the same directory that simply can do
include (file.php)
and if a file is in the child folder like
include (folder/file.php)
.
but I want to make my root WordPress folder project cleaner then change the location of my template files to pages-template
folder but unfortunately, I can't include files from another folder that are the sibling with pages-template
.
I try this
include '../inc/package-save.php';
but I got errors
Warning: include(../inc/package-save.php): failed to open stream: No such file or directory
any trick to fix this.