我在Windows上尝试在IIS中提供PHP文件时看到以下错误,我的linux服务器上的一切都很好。
Warning: session_start() [function.session-start]: Cannot send session cache limiter -
headers already sent (output started at
C:\Inetpub\vhosts\test\httpdocs\signup.php:1) in
C:\Inetpub\vhosts\test\httpdocs\signup.php on line 1
第一行是:
<?php session_start(); ?>
以下是我的尝试:
将文件保存为Gedit中的UTF8 保存在geany中 - 属性显示'UTF-8(无BOM)' 在http://people.w3.org/rishida/utils/bomtester/index.php上测试了文件,结果是:
No BOM
由于
答案 0 :(得分:0)
在调用php session start函数之前检查是否发送数据。它可以是一个换行符,一个空格......这个错误记录在php doc中,用于函数session_start()