Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

razinusagi's avatar

Storage::makeDirectory in public folder

I'm trying to create folder in public/storage but when i call Storage::makeDirectory("public/storage/newdirectory") it creats folder in storage folder with subfolders public/storage/newdirectory. when i try to change it to ../public/storage then i get error message "Path is outside of the defined root". Any idea how can i change it?

0 likes
2 replies
tykus's avatar

../ take you up one level and outside the project directory; what are you trying to achieve??

razinusagi's avatar

Solution changed Storage to File and it worked.

Please or to participate in this conversation.