Current Location: Home> Function Categories> chown

chown

Change file owner
Name:chown
Category:File system
Programming Language:php
One-line Description:Change the file owner.

Definition and usage

chown() function changes the owner of the specified file.

Return TRUE if successful, otherwise return FALSE.

Example

 <?php
chown ( "test.txt" , "charles" )
?>

grammar

 chown ( file , owner )
parameter describe
file Required. Specify documents to be inspected.
owner Specify new owners. It can be the username or the user's ID.

illustrate

Try changing the owner of the file file to user owner (specified by username or user ID). Only the superuser can change the owner of the file.

Similar Functions
  • Read files (safely used in binary files) fread

    fread

    Readfiles(safelyused
  • Open a file or URL fopen

    fopen

    OpenafileorURL
  • Returns the file name part in the path basename

    basename

    Returnsthefilenamepa
  • Provide information about the document stat

    stat

    Provideinformationab
  • Rename a file or directory rename

    rename

    Renameafileordirecto
  • Group of files obtained filegroup

    filegroup

    Groupoffilesobtained
  • All remaining data at the output file pointer fpassthru

    fpassthru

    Allremainingdataatth
  • Read a line from a file pointer fgets

    fgets

    Readalinefromafilepo
Popular Articles