Üye İşlevi olmayan bir nesne

0 Cevap php

Ben xml getiriliyor için basit bir fonksiyon oluşturduk:

function meteor(){
    $request_url = "http://site.com/xml.xml";
    $xml = simplexml_load_file($request_url) or die("feed not loading");
    return $xml;
 }

Ama bu işleve çağrı yapamazsınız:

$xmls = new meteor();
echo $xmls->Kemo->Area;

I have not any output because meteor in not a class. In this situation, how can fetch data from function? Thanks in advance

0 Cevap