Question About PHP mkdir

So i have this php file which writes a folder


but im stuck here because when this script is activated is just simply does not work, i tested this in localhost using xampp and it works perfect (C:\xampp\htdocs\internalfiles)

the script was supposed to writes files inside the folders (example: claimedrewards)
but its just not working.

A screenshot showing a part of your code and a few keywords as to what it’s supposed to do doesn’t tell me a lot.

What have you done to debug this already? Does the mkdir call return true? Did you try enabling display_errors and see if any error messages are displayed?

One key point to pay attention to: the mkdir call does not create directories recursively by default. So if you try to create the folder [...]/htdocs/internallfiles/claimedrewards/$id, but the folder [...]/htdocs/internallfiles/claimedrewards does not exist, the mkdir file will just fail, it won’t create the underlying directories for you.

Also, I don’t know if this is intentional or not, but there is a typo in internallfiles, notice the double l.

oh lol i put internallfiles, btw does creating folders via /home/vol14_2/epizy.com/epiz_33930104/htdocs/ works?

your path is incorrect

you need to remove everything before htdocs including htdocs

image

It should just work. Using relative directories is recommended for portability, but using absolute paths should work as well.