Page 1 of 1

Why function chmod() not working

Posted: Sat Mar 03, 2012 11:25 am
by dadli
Hello.
there is a some.txt file, i read permission of this file, Is equal to: 0666.

I must change the permission the some.txt file as: 0777
this is my code:

Code: Select all

if (chmod('count.txt',0777)) {
	echo substr(decoct(fileperms('count.txt')),-4); // The result is similar to 0666 
}
Question: why not change file permissions ?

operating system is: Windows xp

Re: Why function chmod() not working

Posted: Sat Mar 03, 2012 12:44 pm
by requinix
Because it's Windows. Windows doesn't have a permissions system like Unix.

Re: Why function chmod() not working

Posted: Sat Mar 03, 2012 1:31 pm
by dadli
Oh clearly, thanks :)