php - "Header already sent" error in Wordpress site
问题描述
I'm working on a Wordpress site and I have set an SSL certificate. I got the following error,
Warning: Cannot modify header information - headers already sent by (output started at /var/www/mylink/wp-config.php:1) in /var/www/mylink/data/www/mylink/wp-login.php on line 411 Warning: Cannot modify header information - headers already sent by (output started at /var/www/mylink/data/www/mylink/wp-config.php:1) in /var/www/mylink/data/www/mylink/wp-login.php on line 424.
I have tried blank spaces, echo before php tag, and many more but was not able to solve this issue. I'm not able to open my admin panel and when I open my site with wp-admin
URL, it shows only the above error. If I open my admin panel with wp-login.php
, it shows login page but I'm not able to logged in.
Any help is appreciated. Thanks.
Please check the image for further clarification.
解决方案
您是否尝试过以下解决方案?ob_start(); ob_get_clean(); 它将获取当前缓冲区内容并删除当前输出缓冲区。
推荐阅读
- mongodb - 是否可以使用 MongoDB $lookup 在 $facet 之后加入两个聚合管道结果?
- javascript - 单击按钮时如何设置加载并在超时后显示结果?
- javascript - Chrome 扩展程序:即使执行了所有步骤,也找不到本机消息传递主机
- php - 如何在禁用 Rest Api 后修复联系表格 7 不发送消息?
- python - 使用索引或拆分函数拆分和使用字符串的不同部分
- css - 参考像素的物理宽度
- apache-kafka - 性能:多个生产者写入同一主题
- javascript - 如何将图像(已捕获但未在本地保存)存储在 json 对象中,然后显示 json 对象?
- python - 在 python 脚本中播放 MP3 文件到 Raspberry Pi 4 连接的蓝牙设备
- php - PHP中的嵌套列表