How to manipulate windows file and folder attribute with PHP?

六月ゝ 毕业季﹏ 提交于 2021-02-10 14:22:54

问题


Is this any possible way to set or change windows file and folder attribute with php?

I'm creating desktop.ini file in some folders with php. But I need to make it HSA - Hidden, System file, Archive - In addition I need to make folder read-only which is a R flag.

Is there anyway to do that with PHP ? please help me!


回答1:


Finally I find the answer,

exec("attrib +r <any directory>");
exec("attrib +h +s +a desktop.ini");


来源:https://stackoverflow.com/questions/49629856/how-to-manipulate-windows-file-and-folder-attribute-with-php

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!