PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

chmod> <basename
Last updated: Fri, 01 Aug 2008

view this page in

chgrp

(PHP 4, PHP 5)

chgrpChanges file group

Descrierea

bool chgrp ( string $filename , mixed $group )

Attempts to change the group of the file filename to group .

Only the superuser may change the group of a file arbitrarily; other users may change the group of a file to any group of which that user is a member.

Parametri

filename

Path to the file.

group

A group name or number.

Valorile întroarse

Întoarce valoarea TRUE în cazul succesului sau FALSE în cazul eşecului.

Note

Notă: Această funcţie nu va lucra cu fişiere la distanţă, deoarece fişierul care trebuie să fie examinat trebuie să fie accesibil prin intermediul sistemului de fişiere al serverului.

Notă: Când este activat modul securizat, PHP verifică dacă fişierele şi directoarele cu care se va opera au acelaşi UID (proprietar) ca şi script-ul care se execută.

Vedeţi de asemenea



add a note add a note User Contributed Notes
chgrp
Dan Dascalescu
04-Dec-2007 02:12
If you call chgrp and pass a non-existent group, you'll get the warning "Warning: chgrp(): Unable to find gid for nogroup in".

To check beforehand if the group exists, use posix_getgrid() or posix_getgrnam().

chmod> <basename
Last updated: Fri, 01 Aug 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites