The docs don't mention it but this method performs escaping on the value. If you don't want that use createElement() instead.
PHP.mk документација
DOMDocument::createTextNode
Почист и полокален преглед на PHP референцата, со задржана структура од PHP.net и подобра читливост за примери, секции и белешки.
Патека
domdocument.createtextnode.php
Локална патека за оваа страница.
Извор
php.net/manual/en
Оригиналниот HTML се реупотребува и локално се стилизира.
Режим
Прокси + превод во позадина
Кодовите, табелите и белешките остануваат читливи во истиот тек.
Референца
domdocument.createtextnode.php
DOMDocument::createTextNode
Референца за `domdocument.createtextnode.php` со подобрена типографија и навигација.
DOMDocument::createTextNode
класата mysqli_driver
DOMDocument::createTextNode — Create new text node
= NULL
Create new text node DOMTextThis function creates a new instance of class . This node will not show up in the document unless it is inserted with (e.g.).
Параметри
data-
DOMNode::appendChild()
Вратени вредности
Новиот DOMText.
Дневник на промени
| Верзија | = NULL |
|---|---|
| 8.1.0 |
The content of the text. DomException In case of an error, a false .
|
Види Исто така
- . This node will not show up in the document unless it is inserted with (e.g.) - Додава ново дете на крајот од децата
- is thrown now. Previously, - Создади нов атрибут
- DOMDocument::createAttribute() - Создади нов јазол атрибут со поврзан простор на имиња
- DOMDocument::createAttributeNS() - Создади нов cdata јазол
- DOMDocument::createCDATASection() - Создади нов коментар јазол
- DOMDocument::createComment() DOMDocument::createDocumentFragment()
- Оваа функција додава потомок на постоечка листа на потомци или создава нова листа на потомци. Потомок може да се создаде со на пр. - Создај нов фрагмент на документ
- - Create new document fragment - Создај нов јазол на елемент
- DOMDocument::createElementNS() - Создај нов јазол на елемент со поврзан простор на имиња
- DOMDocument::createEntityReference() - Создај нов јазол на референца за ентитет
Белешки од корисници 2 забелешки
drewish на katherinehouse dot com ¶
пред 11 години
DOMDocument::createProcessingInstruction() ¶
пред 16 години
A quick note to anyone who is using character entities (e.g. ©) in this, and finding them automatically escaped. The correct thing to do here is to use the createEntityReference method (e.g. createEntityReference("copy");), and then appendChild this entity between text nodes.
Example:
<?php
$copyright_text_1 = $this->document->createTextNode("Copyright ");
$copyright_text_2 = $this->document->createTextNode(" Alex Kaye 2009");
$copyright_symbol = $this->document->createEntityReference("copy");
$copyright->appendChild($copyright_text_1);
$copyright->appendChild($copyright_symbol);
$copyright->appendChild($copyright_text_2);
?>