Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经在 config.php 文件中开始了我的会话,并且我在我网站的每个页面上都包含了该文件,我的网站在 localhost 中运行良好,
但是当我完成它时,它会显示这样的错误,
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent
有什么建议么...
谢谢,
在调用 session_start 之前检查您是否不发送内容。只需将 session_start 作为您在 PHP 文件中做的第一件事。
<?php session_start(); ?>
如果您在代码末尾关闭后还有空间,PHP Tags那么config.php这些警告也会出现。
PHP Tags
config.php
因此,请确保关闭后没有任何PHP Tags 空间?>
?>