Answer the question
In order to leave comments, you need to log in
How can a class be called without creating an instance?
We need to call the class without creating an instance of it, here is the code:
$filesystem = new FileSystem();
$filesystem->DeleteAllDirectory('../../server/users/' . $_SESSION['user']['user_folder']);
Answer the question
In order to leave comments, you need to log in
For non-static methods, you must create an instance, but you can do this
(new FileSystem())->DeleteAllDirectory('../../server/users/' . $_SESSION['user']['user_folder']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question