调用成员函数时会导致致命错误调用php中未定义的函数


member function when called result into Fatal error Call to undefined function in php

我有一个类

<?php
include 'mysql.php';
include '/XXXXXXXXXXX/web/settings/funciones.php';
class processXML
{
var $idFeed;
var $idPais;
var $suf,$pref;
var $lastCode;
var $curCode;
var $localDb ;
var $remoteDb ;
var $imagenTag; 
var $palntilla;
  function processXML($x, $y)
  {
      $his->idFeed = $x;
      $this->idPais=$y;
      $this->localDb = new dataBase();

  }
 function setLC()
 {
     $sql = "SELECT max(id) as ID,feed , idpropiedad FROM `registrofeed` WHERE feed=".$his->idFeed."";
     $result = $this->localDb->execute($sql);
     $row=mysql_fetch_array($result);
     $this->lastCode = $row['idpropiedad'];
 }
 function setImageTag()
 {
     $this->palntilla = returnPlantilla($his->idFeed); 
    $result = $this->localDb->execute("select infopropiedades from propiedadesPlantilla where palntilla=".$this->palntilla."");
    $row=mysql_fetch_array($result);
    $propiedadesColumn = explode("[;;]",$row["infopropiedades"]);
    foreach($propiedadesColumn as $val)
    {
       $x= explode("=",$val);   
       if(trim($x[0])=="Fotos" or trim($x[0])=="fotos")
       {
         $this->imagenTag = trim($x[1]);   
       }
    }
 }
 function printVars()
 {
     setLC();
     setImageTag();
     echo "idFeed=".$this->idFeed."<br>";
     echo "idPais=".$this->idPais."<br>";
     echo "imgTag=".$this->imagenTag."<br>";
     echo "lastCode=".$this->lastCode."<br>";    
 }

}

然后我像这样给全班打电话

$obj = new processXML(20,4);
$obj->printVars();

我收到一个致命错误

Fatal error: Call to undefined function setLC() in 

知道的原因吗

提前感谢

您正在调用一个类方法,因此需要:

$this->setLC();
$this->setImageTag();
// etc.
$this->setLC();
$this->setImageTag();

还修复了这个问题:

$this->idFeed=$x;而不是$his->idFeed=$x//正在处理XML函数