0
xmlファイルを作成しようとしましたが、警告を受け取りました。警告 'SimpleXMLElement :: addChild():終了していないエンティティ参照
WARNING 'にSimpleXMLElement ::はaddChild():終端されていない実体参照ブラント・ジョンソン'
私はxmlファイルを開こうとするので、エラー
This page contains the following errors:
error on line 3 at column 4: StartTag: invalid element name
Below is a rendering of the page up to the first error.,
を取得し、私は私のエラーは、このPHPの警告と関連していると思います。ここ
は、関連するコードを使用すると、このエラーが発生する理由のポイントをピンするために私を助けることができる
if ($value instanceof Zend_Config) {
$child = $xml->addChild($key);
$this->_addBranch($value, $child, $xml);
} else {
$xml->addChild($key, (string) $value);
}
です。私のXMLでのアンパサンド「&」があったときに、この
if ($value instanceof Zend_Config) {
$child = $xml->addChild($key);
$this->_addBranch($value, $child, $xml);
} else {
$xml->$key((string) htmlspecilalchars($value));
}