How in PHP to make code 1 site could create a folder, and the second is not?

For example, there are test.com and test1.com sites in the D:/www/test/ and D:/www/test1 folders.

How to make test.com able to execute mkdir("D:/www/123/"); and mkdir("123"); а test1.com only the second?

    1 answer 1

    Probably the right solution would be to limit $_SERVER['HTTP_USER_AGENT'] or ip $_SERVER['REMOTE_ADDR'] if you are trying to log in externally.

    • this is for hosting, everything goes on my computer, I have a white ip - lodiur
    • And then probably with the help of apacha, linux.org.ru/forum/admin/711339 should be done - Chameleon
    • My problem is that you can create from local folders. Those. from folder D: / www / test1 you can create folder D: / www / 123 - lodiur
    • I do not quite understand why this should be done? - Chameleon
    • VPS / VDS hosting - lodiur