PHP 怎么调试(看下面错误信息)

来源:百度知道 编辑:UC知道 时间:2024/06/07 03:34:24
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\p\APMServ5.2.0\www\htdocs\physics\index.php:7) in C:\p\APMServ5.2.0\www\htdocs\physics\index.php on line 70

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\p\APMServ5.2.0\www\htdocs\physics\index.php:7) in C:\p\APMServ5.2.0\www\htdocs\physics\index.php on line 70

session_start()语句应该放在你所有的输出语句之前。

如果你不知道什么是输出的话,请你确保session_start()在你文件的第二行吧,第一行是<?php,这之前不能有任何内容,否则就可能出你这样的错。