首 页   · 站长博客 · 用户注册 · 会员登陆  · 会员排行  ·最新主题  ·最近回复  精华区  版权声明  ·论坛管理
  当前登录身份:游客,请先登录。  笔名: 口令: 验证码:   
楼 主  index »  PHP安装/语法/函数 » [求助]php5.0session_start()错误  


  作者:mengxiangb
  注册时间:2004-11-12
  主题/回复:3/0
  积分:415
  等级:★★☆(五级)
  称号:略有小成

  mengfanj@163.com..
  未提供
  www.

 

 发表:2004-11-12 17:39:23 阅读 2383 次 回复 2 次 得分2  |   字号 字色
[求助]php5.0session_start()错误
code:
<?php
echo phpinfo();
session_start();
?>
执行时输出:
php5.0信息可以输出但出现如下警告
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Inetpub\wwwroot\t.php:2) in C:\Inetpub\wwwroot\t.php on line 4

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Inetpub\wwwroot\t.php:2) in C:\Inetpub\wwwroot\t.php on line 4
不知该如何解决
 
 1#楼  
 
  回复人:小佳
  注册时间:2004-10-01
  主题/回复:4/31
  积分:451
  等级:★★☆(五级)
  称号:略有小成

   
 1#楼 发表于2004-11-13 00:00:49  评分:1 

把session_start();移到第一行
 2#楼  
 
  回复人:一起PHP
  注册时间:2004-02-27
  主题/回复:247/1521
  积分:4649
  等级:★★★★★☆(十一级)
  称号:论坛圣人

   
 2#楼 发表于2004-11-13 03:32:12  评分:1 

严重同意  小佳
  页数1/1首页 « 1 » 末页
  发表回复:您还没有登陆,无法发表回复。请先[登陆]

一起PHP技术联盟 主办:一起PHP 联系方式:站长QQ:4304410 QQ群:8423742 20159565 站长博客 E-mail: nqp@nqp.me 执行时间:0.004sec
SimsmaBBS 2008 (v6.0) Developed by 17php.com,Copyright(C)2003-2010 All rights reserved. 副本授权:一起PHP官方专用版