WordPress插件激活的标题已发送错误 [英] Wordpress Plugin Activited Header Already Send Error

查看:53
本文介绍了WordPress插件激活的标题已发送错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要疯了:/

<?php
/*
Plugin Name: TEST Plugin
Description: test desc
Author: test
Author URI: test
Plugin URI: test
*/
echo"test";
?>

错误:插件在生成期间产生了4个字符的意外输出激活.如果您注意到标题已发送"消息,则说明存在问题对于联合供稿或其他问题,请尝试停用或删除这个插件

Error : The plugin generated 4 characters of unexpected output during activation. If you notice "headers already sent" messages, problems with syndication feeds or other issues, try deactivating or removing this plugin

推荐答案

删除不必要的空格或换行符这将消除错误还要删除最后一个

remove unnecessary white space or line break that will remove the error also remove last

?>

尝试下面的代码

<?php
/*
    Plugin Name: TEST Plugin
    Description: test desc
    Author: test
    Author URI: test
    Plugin URI: test
*/
ob_start();
echo 'test';
ob_clean();

这篇关于WordPress插件激活的标题已发送错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆