Current Location: Home> Function Categories> chgrp

chgrp

Change the group to which the file belongs
Name:chgrp
Category:File system
Programming Language:php
One-line Description:Change the file group.

Definition and usage

chgrp() function changes the group to which the file belongs.

Return TRUE if successful, otherwise return FALSE.

Example

 <?php
chgrp ( "test.txt" , "admin" )
?>

grammar

 chgrp ( file , group )
parameter describe
file Required. Specify documents to be inspected.
group Optional. Specify new groups. Can be the group name or the group ID.

illustrate

Try changing the group to which the file file belongs to a group (specified by the group name or group ID).

Only super users can modify the group of files at will, and other users may only be able to change the group of files into the group where the user is.

Similar Functions
  • alias for fwrite fputs

    fputs

    aliasforfwrite
  • Modify the owner of the symbolic link lchown

    lchown

    Modifytheownerofthes
  • Format the line to CSV and write to the file pointer fputcsv

    fputcsv

    FormatthelinetoCSVan
  • Determine whether the given file name is executable is_executable

    is_executable

    Determinewhethertheg
  • Close process file pointer pclose

    pclose

    Closeprocessfilepoin
  • Change file owner chown

    chown

    Changefileowner
  • Get file size filesize

    filesize

    Getfilesize
  • Read a line from a file pointer fgets

    fgets

    Readalinefromafilepo
Popular Articles