以下显示外部html文件内容的代码需要我的帮助。它可以工作,但加载速度非常慢。
我将以下代码添加到functions.php
function show_file_func( $atts ) {
extract( shortcode_atts( array(
'file' => ''
),$atts ) );
if ($file!='')
return @file_get_contents($file);
}
add_shortcode( 'show_file','show_file_func' );
然后使用以下短代码进入引用该文件的页面。
如果有其他选择或建议可以更快地加载内容。.谢谢。