可以';Don’我不能消除这些错误


can't get rid of this errors

所以我一直在做一些项目,需要在页面中显示数据库表,但由于它有很多数据,我使用分页使其看起来更简单,代码运行得很完美,表也以正确的方式显示。

但我收到了一条错误消息:

注意:中未定义的变量:_PHP_SELFC: 第74行上的''examplep''htdocs''test2''test4.php

困扰我的是,我找不到它是什么,以及如何从我的页面上删除它,我需要帮助,因为这个项目的最后期限很快就会结束

这是代码

<html>
<head>
<title>Paging Using PHP</title>
</head>
<body>
<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '';
$rec_limit = 10;
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn )
{
  die('Could not connect: ' . mysql_error());
}
mysql_select_db('test1');
/* Get total number of records */
$sql = "SELECT count(msisdn) FROM bbs_1 ";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
  die('Could not get data: ' . mysql_error());
}
$row = mysql_fetch_array($retval, MYSQL_NUM );
$rec_count = $row[0];
if( isset($_GET{'page'} ) )
{
   $page = $_GET{'page'} + 1;
   $offset = $rec_limit * $page ;
}
else
{
   $page = 0;
   $offset = 0;
}
$left_rec = $rec_count - ($page * $rec_limit);
$sql = "SELECT bill_cycle, total_bill_amount, total_outstanding_amount ".
       "FROM bbs_1 ".
       "LIMIT $offset, $rec_limit";
$retval = mysql_query( $sql, $conn );
if(! $retval )
{
  die('Could not get data: ' . mysql_error());
}
    echo"<table>".
            "<tr>".
                "<td>CYCLE</td>".
                "<td>TOTBILL</td>".
                "<td>OUTSTANDING</td>".
            "</tr>";
while($row = mysql_fetch_array($retval, MYSQL_ASSOC))
{
    echo 
            "<tr>".
                "<td>{$row['bill_cycle']} </td>".
                "<td>{$row['total_bill_amount']}</td>".
                "<td>{$row['total_outstanding_amount']}</td>".
             "</tr>";
} 
echo "</table>";
if( $page > 0 )
{
   $last = $page - 2;
   echo "<a href='"$_PHP_SELF?page=$last'">Last 10 Records</a> |";
   echo "<a href='"$_PHP_SELF?page=$page'">Next 10 Records</a>";
}
else if( $page == 0 )
{
   echo "<a href='"$_PHP_SELF?page=$page'">Next 10 Records</a>";
}
else if( $left_rec < $rec_limit )
{
   $last = $page - 2;
   echo "<a href='"$_PHP_SELF?page=$last'">Last 10 Records</a>";
}
mysql_close($conn);
?>

希望您能找到问题,

浏览器只会在给定问号和查询字符串的情况下计算出该怎么做;没有必要告诉它将它们应用于当前URL。