php.ini
register_globals = On

解决方案 »

  1.   

    数据库已经有了,LY表里面有内容.我到C:\WINNT\Temp 下也看到有session很多的文件. 
    admin.php在index.php前面的,先进admin.php,后进index.php 
    现在把register_globals諼成是on后,变成进不了http://127.0.0.1/freewind/index.php了,说:"你没有管理员权力"呀!index.php原码如下: 
    <? 
    //此程序为主程序,用于列出留言内容,和实现删除、修改的管理功能. 
    include("connect.inc.php"); 
    if ($load == "Go" ) { 
    if (($in_admin == "") or ($in_password == "")){ 
    echo "<center>没有填完</center>"; 
    exit; 

    session_save_path($session_path); 
    $query = "select * from $admin_table"; 
    $result = mysql_query($query); 
    $number = mysql_num_rows($result); 
    $row = mysql_fetch_array($result); 
    $admin = $row[admin]; 
    $password = $row[password]; 
    if ($admin == $in_admin and $password == $in_password) { 
    $right_admin = "$admin"; 
    $right_password = "$password"; 
    session_register("right_admin"); 
    session_register("right_password"); 
    }else { 
    mysql_close($connect); 
    die("你没有管理员权力"); 


    require("check_session.inc.php"); 
    if ($delete){ 
    check_session($right_admin,$right_password,1,$admin_table); 
    $delete_ly_query = "select * from $table "; 
    $result = mysql_query($delete_ly_query); 
    MYSQL_QUERY("DELETE from $table where (id='$delete') "); 
    mysql_close($connect); 

    include("form.inc.php"); 
    if (!isset($page)){ 
    $page=0; 

    include("page.inc.php"); 
    if ($keyword){ 
    $query = "select * from $table order by id desc"; 
    }else{ 
    $query = "select * from $table order by id desc limit $page,$limit"; 

    $result = mysql_query($query); 
    $re_total = mysql_num_rows($result); 
    if ($re_total == 0) { 
    print "<br><center>暂时没有留言</center>"; 
    exit; 
    mysql_close($connect); 

    elseif ($re_total>0){ 
    check_session($right_admin,$right_password,0,$admin_table); 
    $i=0; 
    while ($i < $re_total){ 
    $row = mysql_fetch_array($result); 
    $name = stripslashes($row[name]); 
    $content = stripslashes($row[content]); 
    $email = stripslashes($row[email]); 
    $homepage = stripslashes($row[homepage]); 
    $color = $row[color]; 
    $time =$row[time]; 
    $pic = $row[pic]; 
    $id = $row[id]; 
    if ($keyword) { 
    ////////////////////////////////// 此句设关键字对大小写敏感 //////////////////////////////////////////////// 
    ////if ($content !=ereg_replace($keyword,"",$content)) or ($name !=eregi_replace($keyword,"",$name) { /// 
    if (($content !=eregi_replace($keyword,"",$content)) or ($name !=eregi_replace($keyword,"",$name))) { 
    include("list.inc.php"); 


    else { 
    include("list.inc.php"); 

    $i++; 


    include("page.inc.php"); 
    mysql_close($connect); 
    ?>
      

  2.   

    不好意思,应该是admin.htm,不是admin.php.不是"先进admin.php,后进index.php" 直接输入:http://127.0.0.1/freewind/index.php
    就可以进入index.php
    现在可以在:http://127.0.0.1/freewind/index.php?ly=1留言了,但在admin.htm填了管理员帐号和密码后,按:go,
    却进不了index.php页,说:你没有管理员权力"
      

  3.   

    这是密码不对嘛,
    echo $in_admin;
    echo $in_password;
    试试看,是不是和你数据库里的用户名和密码一样!