Help creating a directory in PHP

  • Answered
I've spent two hours on this and cannot figure it out...and I NEED help here. I have a script to create a folder in one directory, let's call it mysite.mydomain/testscript/ And I'm trying to write it to another folder on the site, say mysite.mydomain/profile/ The result would be a new folder mysite.mydomain/profile/ But I CANNOT get this to work. I'm using this code: I run the file and get this warning - mkdir(): File exists in Is the warning telling me I cannot create folders in other folders? If so, why isn't it kicking back a permission denied error? Second... how... HOW do I get this to work?
Hello Orbfan,

Sorry to hear you are getting an error when running your code. I ran your code on my own server and that ran without issue. When I ran the code again, I got the same error. The error occurs because the folder has already been created.

Kindest Regards,
Scott M