在header(),setcookie()等函数之前不可有内容输出,调整一下
解决方案 »
- 用我这种方法写数组太麻烦了,请高手指教一下
- Php堕落群 第十二轮散分宣传
- PHP 关于session_start()的一个巨大问题 【在刷新时出现】 求救
- 根据不同国家的访问用户重定向到不同网页
- PHP JAVASCRIPT
- 求php压缩解压zip/rar文件的class,谢谢
- 怎么样在多个子域名间共享session
- select isnull(MAX(b),0)+1 from tba
- 关于ImageMagick生成缩略图的问题,这次我真的不行了。
- 各位大神,初学者,告诉我怎么修改行间距啊,着急!!!!
- 通过php方式,如何实现在下载.mht文件时,只允许打开这个mht文件,不允许保存。
- 重新提问:动态文本框加一个日历控件
给你个例子
<?php
setcookie("","", );
?>
把这个放在最顶上试试
setcookie在向浏览器发送请求时,不能有任何数据输出到浏览器
setcookie() defines a cookie to be sent along with the rest of the HTTP headers. Like other headers, cookies must be sent before any output from your script (this is a protocol restriction). This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace. If output exists prior to calling this function, setcookie() will fail and return FALSE. If setcookie() successfully runs, it will return TRUE. This does not indicate whether the user accepted the cookie.