如果Windows中的文件设置了隐藏属性,则会隐藏该文件.没有内置函数来执行此操作,因此您需要使用system/exec来执行attrib应用程序.像这样:
$file = 'test.txt';
system('attrib +H ' . escapeshellarg($file));
Run Code Online (Sandbox Code Playgroud)
这将在test.txt上设置隐藏(+ H)标志.
| 归档时间: |
|
| 查看次数: |
3371 次 |
| 最近记录: |