原型
get_file( $path )
源文件
路径:wp-admin/includes/noop.php
<?php
...
function get_file( $path ) {
if ( function_exists('realpath') ) {
$path = realpath( $path );
}
if ( ! $path || ! @is_file( $path ) ) {
return '';
}
return @file_get_contents( $path );
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_file/