dongmiao260399 2012-07-03 22:54
浏览 27

too long

This question already has an answer here:

I am having this error in a developing plugin.
Works fine in localhost but in the remote server fails with:

Warning: Cannot modify header information - headers already sent by (output started at /path_wordpress/public_html/wp-admin/includes/template.php:1657) in /path_wordpress/public_html/wp-includes/pluggable.php on line 866

I have removed all spaces before and after at the beginning and end of files (the common reason for this error) and there are no sessions involved.

What another reasons could be?

===
EDIT 1

wp-admin/includes/template.php:

$attributes = '';
if ( is_array( $other_attributes ) ) {
    foreach ( $other_attributes as $attribute => $value ) { // line 1657 
        $attributes .= $attribute . '="' . esc_attr( $value ) . '" '; // Trailing space is important
    }
} else if ( !empty( $other_attributes ) ) { // Attributes provided as a string
    $attributes = $other_attributes;
}

===
EDIT 2:

wp-admin/wp-includes/pluggable.php:

if ( !function_exists('wp_redirect') ) :
/**
 * Redirects to another page.
 *
 * @since 1.5.1
 * @uses apply_filters() Calls 'wp_redirect' hook on $location and $status.
 *
 * @param string $location The path to redirect to
 * @param int $status Status code to use
 * @return bool False if $location is not set
 */ // line 866
function wp_redirect($location, $status = 302) {
    global $is_IIS;
</div>
  • 写回答

1条回答 默认 最新

  • dongshengli6384 2012-07-04 02:54
    关注

    Cannot modify header information usually occurs when you try to use header() or redirect function after some html has been outputted. It is unlikely to be inside one of Wordpress native code files, so check some custom code you might have written that tries to redirect the page.

    Reference: http://php.net/manual/en/function.header.php

    评论

报告相同问题?

悬赏问题

  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口