(PHP 5, PHP 7, PHP 8)
DOMDocument::createAttribute — Create new attribute
This function creates a new instance of class DOMAttr. 此節(jié)點(diǎn)出現(xiàn)在文檔中,除非是用諸如 DOMNode->appendChild() 等函數(shù)來將其插入。
localName
The name of the attribute.
The new DOMAttr or false
if an error occurred.
DOM_INVALID_CHARACTER_ERR
Raised if localName
contains an invalid character.