Question About PHP mkdir

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.

5 Likes