2013-07-09 40 views
0

我不斷收到錯誤與標題在這裏的錯誤...我弄不明白爲什麼發生這種情況。我花了大約一個小時左右的時間來開始工作和nadda。mysqli :: select_db():無法在C: xampp htdocs includes class siteHeader.php中獲取第26行的siteHeader

<?php 
class siteHeader extends siteSetting 
{ 
    public $html; 
    public $pid; 

    function __construct() 
    { 
     parent::__construct(); 
      $this->pid = $_GET['pid']; 
      $this->html .= "<body>"; 
      $this->html .="<div id='site_header'>"; 
      $this->constructHeader(); 
      $this->constructMenu(); 
      $this->html .="</div>"; 
      $this->html .= "</body>"; 

    echo $this->html; 
    } 
    function constructHeader() 
    { 
     $this->html .= '<h1>'.SITE_NAME.'</h1>'; 
    } 
    function constructMenu() 
    { 
     parent::select_db('thc_settings'); 
     $que = parent::query('SELECT * FROM pages'); 
     $row = $que->fetch_array(); 
     echo $row[0]; 
    } 
} 
+0

什麼用select_db定義父類()方法是什麼樣子? – CXJ

回答

0

您需要先編輯SiteSettings類。第26行的函數試圖獲取「siteHeader」,但它不存在於你的mysql表中。

parent::select_db('thc_settings'); 

所以,檢查siteSettings類找到select_db功能和編輯它不取siteHeader

相關問題