Why function chmod() not working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dadli
Forum Newbie
Posts: 2
Joined: Sat Mar 03, 2012 11:21 am

Why function chmod() not working

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Why function chmod() not working

Post by requinix »

Because it's Windows. Windows doesn't have a permissions system like Unix.
dadli
Forum Newbie
Posts: 2
Joined: Sat Mar 03, 2012 11:21 am

Re: Why function chmod() not working

Post by dadli »

Oh clearly, thanks :)
Post Reply