Writes a string to a file.
Parameters
$filestringrequired- Remote path to the file where to write the data.
$contentsstringrequired- The data to write.
$modeint|falseoptional- The file permissions as octal number, usually 0644.
Default:
false
Source
public function put_contents( $file, $contents, $mode = false ) {
return false;
}
Changelog
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |
include_once ABSPATH . 'wp-admin/includes/file.php'; WP_Filesystem(); global $wp_filesystem;