在wordpress中读取外部文本文件

以下显示外部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' );

然后使用以下短代码进入引用该文件的页面。

如果有其他选择或建议可以更快地加载内容。.谢谢。

womeshi 回答:在wordpress中读取外部文本文件

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2974043.html

大家都在问