Join Up!
104879 members and counting!

 
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links 
search for in the  
previouschgrpchownnext
Last updated: Tue, 28 May 2002
view the printer friendly version or the printer friendly version with notes or change language to Czech | German | Spanish

chmod

(PHP 3, PHP 4 >= 4.0.0)

chmod -- Changes file mode

Description

int chmod ( string filename, int mode)

Attempts to change the mode of the file specified by filename to that given in mode.

Note that mode is not automatically assumed to be an octal value, so strings (such as "g+w") will not work properly. To ensure the expected operation, you need to prefix mode with a zero (0):

chmod ("/somedir/somefile", 755);   // decimal; probably incorrect   
chmod ("/somedir/somefile", "u+rwx,go+rx"); // string; incorrect       
chmod ("/somedir/somefile", 0755);  // octal; correct value of mode

Palauttaa TRUE jos onnistui, FALSE jos epäonnistui.

See also chown() and chgrp().

Huomaa: Tätä funktiota ei löydy Windows-alustalla.

User Contributed Notes
chmod
add a note about notes
There are no user contributed notes for this page.
previouschgrpchownnext
Last updated: Tue, 28 May 2002
Copyright © 2001, 2002 The PHP Group
All rights reserved.
This mirror generously provided by: http://phpbuilder.com/
Last updated: Thu Oct 31 18:34:28 2002 EST