Grant Permission to Folder using PHP
-
03-10-2019 - |
Pergunta
I need to grant write permission to temporary folder of all local machine (if it does not have)which access my php site. Is it possible using PHP?
Solução
No, you can't because PHP works server-side only! PHP is used to create HTML output and cannot access files on client-side machines.
chmod('path/to/my/folder',777); will only change file permissions on the server machine - never on a client!
Outras dicas
You can use the php function chmod. You want to be careful of course but you could say
chmod('/path/to/my/folder',777);
Or whatever write permissions you want.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow