I installed a Vagrant box called Homestead, and was trying to run my app.
Locally, I use PHP 7.0.9 on a windows machine
The box uses PHP 7.0.8 on a linux (Ubuntu) machine
The problem:
I am using Codeigniter, with HMVC, which does this:
application/controllers/../modules
application/modules
The solution:
application/controllers
which has a file, so git will save it../
)function resolve_path($path) {
$stack = [];
foreach (explode('/', $path) as $segment)
if ($segment == "..")
array_pop($stack); else
$stack[] = $segment;
return implode('/', $stack);
}
$controller_path = resolve_path(APPPATH . 'controllers/' . $RTR->directory . $class . '.php');