代码:
[root@docker-server]# cat index.php <?php session_start(); header("by: aaa");
Warning: session_start(): Session cannot be started after headers have already been sent in D:\phpstudy_pro\WWW\pt\t.php on line 3
在调用session_start()前不能有任何输出,包括空格和空行,否则会报上面错。
Warning: Cannot modify header information – headers already sent by (output started at D:\phpstudy_pro\WWW\pt\t.php:1) in D:\phpstudy_pro\WWW\pt\t.php on line 4
在调用 header()前不能有任何输出,包括空格和空行,否则会报上面错。
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5262.html