Definition:
In PHP chgrp() function is inbuilt function.The chgrp() function changes the usergroup of the specified file.
chgrp(file, group)
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to change user group for |
group | Required. Specifies the new group name or number |
Errors And Exception:
Change the usergroup to "administrator" for the "test.txt" file:
<?php
chgrp("test.txt","administrator")
?>