我在我的域上转移了wordpress,当我尝试登录时,我收到了这个错误:
ERROR: Cookies are blocked due to unexpected output.
带有以下警告:
Warning: Cannot modify header information - headers already sent by (output started at /customers/e/2/2/myurlsite.com/httpd.www/wp-content/themes/twentythirteen-child/functions.php:10) in /customers/e/2/2/myurlsite.com/httpd.www/wp-login.php on line 424
Warning: Cannot modify header information - headers already sent by (output started at /customers/e/2/2/myurlsite.com/httpd.www/wp-content/themes/twentythirteen-child/functions.php:10) in /customers/e/2/2/myurlsite.com/httpd.www/wp-login.php on line 437
我知道这个问题在我的functions.php文件中,但我不知道如何解决它,因为我对php一无所知。这是第10行的函数.php代码
<?php
add_action( 'wp_enqueue_scripts', 'wpsites_google_fonts' );
function wpsites_google_fonts() {
wp_enqueue_style( 'gfonts', '//fonts.googleapis.com/css?family=Oswald|Open+Sans|Euphoria+Script|Cookie', array(), CHILD_THEME_VERSION );
}
?>
有人能告诉我这个文件的问题在哪里吗?感谢
从funtion.php中删除最后一个?>
,如果您使用了多个<?php ?>
,则删除多余的空格或添加ob_start();在<?php
之后启动