【问题标题】:Error message when editing Wordpress Footer.php编辑 Wordpress Footer.php 时出现错误消息
【发布时间】:2020-03-25 08:17:56
【问题描述】:

我正在 Wordpress 上更新我的网站中的 footer.php,我所做的只是更新网络链接。但是,当我替换链接并按更新时,会出现此错误消息;

无法与站点通信以检查致命错误,因此 PHP 更改已恢复。您将需要通过其他方式上传您的 PHP 文件更改,例如使用 SFTP。

所以我不知道接下来的步骤,我看到一个红点,当我将鼠标悬停在它上面时,它会出现;

\ufeff

这对我来说毫无意义,以下是我正在编辑的代码。 (我正在编辑“社交媒体链接”区域顶部的网络链接,我已经更新了 facebook,这就是我所能做的。错误出现在第一个之前。

  </div>

<div id="socialmedialinks">
<a href="http://www.facebook.com/WestWirralScouts/"><img src="<?php echo bloginfo('stylesheet_directory'); ?>/images/social-facebook-large.png" width="40px"></a> <a href="http://www.twitter.com/ukscouting/"><img src="<?php echo bloginfo('stylesheet_directory'); ?>/images/social-twitter-large.png" width="40px"></a> <a href="http://www.instagram.com/scouts/"><img src="<?php echo bloginfo('stylesheet_directory'); ?>/images/social-instagram-large.png" width="40px"></a> <a href="#"><img src="<?php echo bloginfo('stylesheet_directory'); ?>/images/social-newsletter-large.png" width="40px"></a> <a href="mailto:info.centre@scouts.org.uk"><img src="<?php echo bloginfo('stylesheet_directory'); ?>/images/social-email-large.png" width="40px"></a>
</div>
<div id="footer"><?php wp_footer(); ?>

<div id="footerleft">
    <?php   /* Widgetized sidebar, if you have the plugin installed. */                     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(9) ) : ?>
    <?php endif; ?>
    </div>

    <div id="footermiddle">
    <?php   /* Widgetized sidebar, if you have the plugin installed. */                     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(10) ) : ?>
        <?php endif; ?>
    </div>

    <div id="footerright">
    <?php   /* Widgetized sidebar, if you have the plugin installed. */                     if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(11) ) : ?>
        <?php endif; ?>
    </div>

<div style="float:right">
<a href="http://www.ceop.gov.uk/"><img src="<?php bloginfo('template_directory'); ?>/images/CEOPReportBtn.gif"></a>
</div>

<div id="copyright"><p>© <?php bloginfo('name'); ?>, all rights reserved | Charity number: 520278<br />
    </p></div>
</div>

</body>
</html>

非常感谢您的帮助, 基兰

【问题讨论】:

标签: php wordpress


【解决方案1】:

使用 FTP 或您的主机提供的基于云的文件管理器执行编辑。

您正在编辑的内容破坏了代码,或者 Wordpress 突然失去了执行环回请求的能力 - 无论哪种方式,Wordpress 都不允许您从其内置编辑器进行更改,但您可以强制通过 FTP 上传代码进行更改。

在您进行更改后,Wordpress 是否会突出显示语法错误?如果是这样,请将这些错误发布到您的 SO 问题中。

尝试从管理控制台运行Tools &gt; Site Health。查找一条严重错误消息,指出 Wordpress 无法执行环回请求 - 如果您看到此消息,则此处还有其他问题在起作用,这些问题已禁用内置的 Wordpress 编辑器。

【讨论】:

    猜你喜欢
    • 2021-03-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-20
    • 1970-01-01
    • 2011-11-05
    • 1970-01-01
    • 2021-06-17
    相关资源
    最近更新 更多