0
我正在使用wp_redirect()
重定向到一个URL,但它给了我下面的警告,并没有重定向。我应该什么时候使用wp_redirect()
?是否有人知道wp_redirect()
是如何工作的?我需要知道什么时候应该使用wp_redirect()?
**[Fri Feb 28 03:58:36 2014] [error] [client 127.0.0.1] PHP Warning:
Cannot modify header information - headers already sent by (output
started at /home/virgo/public_html/others/sites/wepay/wp-content/
themes/twentythirteen/header.php:43) in /home/virgo/public_html/o
thers/sites/wepay/wp-includes/pluggable.php on line 875, referer:
http://127.0.0.1/others/sites/wepay/?page_id=15**
在输出任何内容后,您不能使用它,因为它使用'Location'标头发送重定向,并且标头出现在HTTP消息的正文之前。 – Paulpro
请参阅http://stackoverflow.com/q/7381661/2126792或http://stackoverflow.com/a/12770075/2126792。 – pschueller