Answer the question
In order to leave comments, you need to log in
How to get parent directory from parent directory?
PHP has a magic pseudo-constant __DIR__, analogous to __dirname in node. But there you can just as easily request the parent of the executable file, __DIR__(__DIR__) and so on as many times as you like up to the root. And in the node I can’t google how to implement this without kilometers of code, breaking a line with forward and back slashes.
UPD
Thanks for the help gentlemen, in my case the following option came up
var path = require("path");
path.resolve(__dirname, '..', '..');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question