开发者

PHP Rename() Removes Owner Attribute in Windows?

I am making use of PHP's rename function and I notice it removes the attribute OWNER in windows.

Does anyone know how to over come this? I need to keep the files previous attributes as well as permissions.

Thanks to anyone that can shed some light on this as the php docs didn't help me.

Update

The files I am trying to rename are SQL Server Database files. (Extensions: .mdf and .ldf). I detach these databases from SQL Server and then I rename them with PHP. However, if the properties are viewed before and after. It initially has an attribute OWNER but then after renaming via PHP it does not even 开发者_开发知识库have an OWNER attribute!

Windows 7, SQL Server 2008, PHP 5.3.0


Does chown() work on Windows? See

http://www.php.net/manual/en/function.chown.php


I ended up just using the copy and unlink option, not ideal but it will do for now.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜