PHP sınıfları gerekli değişkeni erişimini beni tutuyor

0 Cevap

ok öylesine i yapmak bir sql insert için kod içeren bir php dosyası var

myfile.php

include($somewhere.'/addleads.php');

addleads.php

require_once(MAIN_CLASS_PATH."common/class.Common.php");
require_once(MAIN_CLASS_PATH."modules/Leads/class.Leads.php");
$objcommon    = new common();
$objLeads     = new Leads();
$Errormsg = $objLeads->AddLBCleads($_REQUEST);

class.Leads.php

class Leads extends Common{

function Leads(){
    $this->Common();
    $this->Leadstype        = "Leadstype";
    $this->Leads            = "Leads";


}

function AddLBCleads($objArray){

    global $_REQUEST,$objSmarty,$global_config;
    $objLeads = new Leads();
    $objInsertArray['txtP_Ident']       = $objArray['selProperty'];
    $objInsertArray['txtFirstName']     = $objArray['txtfirstname'];
    $objInsertArray['txtLastName']      = $objArray['txtlastname'];
    $objInsertArray['txtEmail']         = $objArray['txtEmail'];
    $objInsertArray['txtPhone']         = $objArray['txtPhone'];
    $objInsertArray['txtTypeId']        = $objArray['selleadtype'];
    $objInsertArray['txtComments']      = $objArray['txtcomments']; 
    $StrEnterdate                       = date('Y-m-d H:i:s');
    $objInsertArray['txtMoveDate']      = $StrMoveDate;
    $objInsertArray['txtEntereddate']   = $StrEnterdate;

    $current_id = $this->AddInfoToDB($objInsertArray,"txt",$this->LBCPrimary_leads);

I erişmeye çalıştığınızda Nasıl myfile.php dan $ current_id alırım, o kullanılamaz

0 Cevap