Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

methodNameDescriptionExample
 create chmod($filename, $content = '')  
   
   $mode)

This function can be used to change file permissions on a *nix system.

Expected parameters:

  • $filename: the full path name of a file (including the filename)
  • $mode: permission you want to set in octal mode

The call of 'chmod('/var/www/index.php,777);' grants read, write and execute rights.

copy($filename, $destination)

This function copies a file to a given location. Existing files will be overwritten

Expected parameters:

  • $filename: the full path name of a file (including the filename)
  • $destination: the full path name of a file (including the filename)

Returns: bool

The call of 'chmod('/var/www/index.php,'/var/www/index2.php);' copies the content of the

index.php file to the index2.php file.