douluchuo0801 2014-03-16 01:53
浏览 34
已采纳

实现PHP / Mysql登录系统到Wordpress网站

My friend has a wordpress site and wants me to add my premade PHP/Mysql login system. Currently i'm trying to insert PHP pages into the wordpress templates using this plugin: http://www.willmaster.com/software/WPplugins/.

The plugin lets me add php code to the page using this syntax:

[insert_php] include "account/login.php"; [/insert_php]

However, doing this creates an issues with sessions as the page header is already sent by the wordpress page before the php file is included. I'm getting the following error:

Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at ...) Warning: Cannot modify header information – headers already sent by (output started at...

Any ideas how to fix this?

  • 写回答

2条回答 默认 最新

  • douhuangzhi0707 2014-03-16 03:45
    关注

    You can write the code for your login at the top in the theme's header.php or simply don't have session_start() in login.php. Or use session_status() to check if the session has started.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序
  • ¥15 onvif+openssl,vs2022编译openssl64