WP_Filesystem_FTPext::get_contents_array
Reads entire file into an array.
Метод класса: WP_Filesystem_FTPext{}
Хуков нет.
Возвращает
string[]|false. File contents in an array on success, false on failure.
Использование
$WP_Filesystem_FTPext = new WP_Filesystem_FTPext(); $WP_Filesystem_FTPext->get_contents_array( $file );
- $file(строка) (обязательный)
- Path to the file.
Список изменений
| С версии 2.5.0 | Введена. |
Код WP_Filesystem_FTPext::get_contents_array() WP Filesystem FTPext::get contents array WP 7.1.2
public function get_contents_array( $file ) {
$contents = $this->get_contents( $file );
if ( is_string( $contents ) ) {
return explode( "\n", $contents );
}
return false;
}