PHP:生成的zip文件具有chmod 644 [英] PHP: generated zip has chmod 644
本文介绍了PHP:生成的zip文件具有chmod 644的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用ZipArchive创建Zips,然后提供它们进行下载。我将它们保存在一个文件夹中,并且想每晚删除所有内容(我的cronjob会这样做)。
I'm using ZipArchive to create Zips and then provide them to download. I save them in a folder and I want to delete all every night (my cronjob would do that).
但是现在我看到它们是使用CHMOD644创建的,如果我尝试用脚本删除它们,我总是无法删除它们,因为没有足够的权限。
But now I've seen that they are created using CHMOD 644, and if I try to delete them with my script, I always can't delete them because I do not have sufficient rights.
我如何声明创建的每个新邮政编码都使用777?
How can I declare that every new Zip which is created uses 777?
谢谢求助! Flo
推荐答案
您是否可以像这样修改它?
Are you able to chmod it like so?
chmod("/somedir/somefile", 0777);
这篇关于PHP:生成的zip文件具有chmod 644的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文