drummer392
drummer392

Reputation: 473

Mkdir() in the absolute path

I have a rather interesting question that seems simple to answer, yet I have searched and cannot find the proper answer. I am wanting to create a directory using mkdir() into the root directory of my website. How can this be done if the PHP file that I am using is inside a subdirectory folder (due to project constraints)?

I've tried several variations like putting a " . " before the directory name.

Thanks, drummer392

Upvotes: 2

Views: 7530

Answers (1)

Your Common Sense
Your Common Sense

Reputation: 157880

mkdir($_SERVER['DOCUMENT_ROOT']."/dir");

Upvotes: 6

Related Questions