WP_Filesystem_SSH2::get_contents()
Reads entire file into a string.
Метод класса: WP_Filesystem_SSH2{}
Хуков нет.
Возвращает
Строку|false
. Read data on success, false if no temporary file could be opened, or if the file couldn't be retrieved.
Использование
$WP_Filesystem_SSH2 = new WP_Filesystem_SSH2(); $WP_Filesystem_SSH2->get_contents( $file );
- $file(строка) (обязательный)
- Name of the file to read.
Список изменений
С версии 2.7.0 | Введена. |
Код WP_Filesystem_SSH2::get_contents() WP Filesystem SSH2::get contents WP 6.8
public function get_contents( $file ) { return file_get_contents( $this->sftp_path( $file ) ); }