PHP mkdir(), chmod() and Windows

By | March 30, 2018
Questions:

I am using the PHP function mkdir($path, 0777) to create a new directory on an Apache server (running on Windows).

When I create this and view the folders, Windows has set the dir as read only. Is there a way of changing this without using exec() to cacls.exe? The PHP documentation states that chmod() doesn’t work on Windows but doesn’t say anything about a replacement method.

Google seems to be a little unhelpful on this one.

EDIT: After several minutes talking to administrators at my two-bit educational institution, it seems that their test PHP server for students is being run off of a USB drive. I have a feeling that this will have something to do with it slaps head

Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *