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
  • Copy the file copy

    copy

    Copythefile
  • Establish symbolic connection symlink

    symlink

    Establishsymboliccon
  • Returns the file path information pathinfo

    pathinfo

    Returnsthefilepathin
  • Give information about a file or symbol connection lstat

    lstat

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

    fputcsv

    FormatthelinetoCSVan
  • Determine whether the given file name is a directory is_dir

    is_dir

    Determinewhethertheg
  • Determine whether the given file name is writable is_writable

    is_writable

    Determinewhethertheg
  • Create a file with a unique file name tempnam

    tempnam

    Createafilewithauniq
Popular Articles