Supportnet / Forum / Skripte(PHP,ASP,Perl...)
??????????
Frage
Hallo,
ich habe 'ne klasse geschrieben namens XMLData:
class XMLData
{
var $TStr;
var $XMLString;
var $HTMLString;
function XMLData $XMLStr="",$XSLStr="") {
$this->$XMLString = $XMLStr;
$this->$TStr = $XSLStr;
}
function setXML ($str) {
$this->$XMLString = $str;
}
function setXSL ($str) {
$fd = fopen ($str,"r");
$xslstr = fread ($fd, filesize ($str));
fclose ($fd);
$this->$TStr = $xslstr;
}
}
nun habe ich mir ein Object der Klasse erzeugt : $xmlObject = new XMLData ();
So, nun das, was ich nicht verstehe:
Versuch 1):
$xmlObject->setXML ("XMLString");
print $xmlObject->XMLString;
$xmlObject->setXSL ("./XSL/file.xsl");
Hier gibt er mir ganz korrekt den XML-String aus.
Versuch 2)
$xmlObject->setXML ("XMLString");
$xmlObject->setXSL ("./XSL/file.xsl");
print $xmlObject->XMLString;
Hier gibt er mir plötzlich den Inhalt der XSL-Datei aus ? Versteh ich nicht ... oder bin ich blind ... oder zu blöd ? Was ist falsch ?
Antwort 1 von was´nbetreff
subject = ??????????
antwort = ¿¿¿¿¿¿¿¿¿¿
antwort = ¿¿¿¿¿¿¿¿¿¿
Antwort 2 von Senifor
sorry, heisst das jetzt: auch keine Ahnung oder findest du den Betreff interessanter ?
Antwort 3 von was´nbetreff
keine lösung, nur ne hilfestellung:
http://www.planetpenguin.de/artikel-29.html#id2753240
http://www.planetpenguin.de/artikel-29.html#id2753240
Antwort 4 von semi
Mal unabhängig von der Ausgabe.
Der Zugriff auf die Attribute und Methoden eines Objektes geht in PHP so:
$this->attribut = $value;
statt
$this->$attribut = $value;
Klartext: $ immer nur einmal vor this.
Gruß,
Michael
Der Zugriff auf die Attribute und Methoden eines Objektes geht in PHP so:
$this->attribut = $value;
statt
$this->$attribut = $value;
Klartext: $ immer nur einmal vor this.
Gruß,
Michael
Antwort 5 von ThomasOOP
demnächst bitte ein vernünftigen betreff
dann haste auch mehr hilfe zu erwarten
dann haste auch mehr hilfe zu erwarten

