你没有建立Session的临时目录
你在C:下建立一个temp的目录试试

解决方案 »

  1.   

    仍有以下错误
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Apache\Apache2\htdocs\11\search.php:10) in C:\Apache\Apache2\htdocs\11\search.php on line 42Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Apache\Apache2\htdocs\11\search.php:10) in C:\Apache\Apache2\htdocs\11\search.php on line 42
    select * from movie where movie_name LIKE '%英雄%'
      

  2.   

    session_start()前不能有任何东西输出,包括空格,好好检查一下
      

  3.   

    在c盘根目录建一个叫tmp的文件夹
      

  4.   

    请问以下代码有问题吗,写得好不好.可以给点见意吗
    <?php
    if (!isset($_SESSION["searchstr"]) && !isset($_SESSION["manname"]))
    {
    //注册一个session;
    session_start();
    session_register('searchstr');
    session_register('manname');$search_str=$_POST["search_str"];
    $search_style=$_POST["man_name"];$_SESSION["searchstr"]=$search_str;
    $_SESSION["manname"]=$search_style;
    }    require "con_db_php.inc";
        $newcon= new con_data;
        $newcon->condb();
        //echo $_SESSION["searchstr"];
        if ($_SESSION["searchstr"]=="")
        {
        echo ("请输入要搜索的关键词。");
        }
    $pages=$_GET["pages"];
        if(!isset($pages))
        {
        $pages=1;
        }
    if($pages==0)
        {
        $pages=1;
        }
        //echo ("$search_str");
        //echo ("$search_style");
        if ($_SESSION["searchstr"]!="")
        {
         if ($manname==1)
         {
             $query="select * from movie where words LIKE '%".$_SESSION["searchstr"]."%'";
                //echo $query;
            }
            else
            {
    $query="select * from movie where movie_name LIKE '%".$_SESSION["searchstr"]."%'";
    //echo $query;
            }
            $gPageSize= 20; //每页显示的记录数
            $result = @mysql_query($query);
    $rows=@mysql_num_rows($result);
    $a_row = @mysql_affected_rows($result);
            //得到当前查询到的纪录数 $nNumRows
    if($rows<=0)
    {
    echo "<font size=2>抱歉!没有纪录</font>";
    exit;
    }
    //得到最大页码数MaxPage
    $MaxPage = (int)ceil($rows/$gPageSize);
            if((int)$pages > $MaxPage)
            {
    $pages=$maxPage;
            }
            //echo "<font size=2>第$pages 页,共 $MaxPage 页</font><br><br>";
            if( mysql_data_seek($result,($pages-1)*$gPageSize) )
         for($i=0; $i<$gPageSize; $i++)
    {
    //@mysql_data_seek($result, $i);
    $data = @mysql_fetch_array($result);
                    $Idd=$data[Id];
                    if ($Idd!="")
                    {
    $name = $data[movie_name];
    $address = $data[address];
                    $conok=$data[con_ok];
                    $conno=$data[con_not];
    echo "<tr>";
                    echo "<td>&nbsp;$name</td>";
                    echo "<td>$address</td>";
                    echo "<td>&nbsp;$conok</td>";
                    echo "<td>&nbsp;$conno</td>";
    //echo "<td>&nbsp;&nbsp;<a href=look.php?id=".$Idd."><font size=2>查看</font></a>";
    //echo "<td><a href=poop.php?id=".$Idd."><font size=2>投票</font></a></td>";
                    echo "<td>";
                    echo "<img src=\"image\yes.gif\" border=0 style=\"cursor:hand;\" onClick=\"window.open('pool.php?style=1&Idd=".$Idd."','','width=300,height=200')\">";
    echo "<img src=\"image\isno.gif\" border=0 style=\"cursor:hand;\" onClick=\"window.open('pool.php?style=2&Idd=".$Idd."','','width=300,height=200')\">";
                    echo "</td>";
    echo "</tr>";
                 }
    ?>
    <?php
    }
    }
    $newcon->db_close();
    ?>