错误:无法修改标头信息

时间:2013-10-27 11:48:53

标签: php

我得到的错误:

Cannot modify header information - headers already sent by (output started at 
/home/spikes/public_html/index.php:17) in /home/spikes/public_html/functions.php on line 58

的index.php:

<body>
    <section id="mainWrapper">
        <section>
            <h1>Spikes.co.il</h1>
        </section>
        <?php include('nav.php');?> //line 17
        ....

function.php:

function createSession($userid,$firstname)
{
    $expire=time()+60*60*24*30;
    setcookie("usid", $userid, $expire);
    setcookie("usname", $firstname, $expire);
}

我真的不明白为什么会这样......

0 个答案:

没有答案