downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DOMDocument> <DOMComment
[edit] Last updated: Fri, 23 Mar 2012

view this page in

DOMComment::__construct

(PHP 5)

DOMComment::__constructYeni bir DOMComment nesnesi oluşturur

Açıklama

__construct ([ string $değer ] )

Yeni bir DOMComment nesnesi oluşturur. Nesne bu haliyle bir belgeye eklenebilir, fakat belge ile ilişkilendirilinceye kadar yeni bir düğüm eklenemez. Yazılabilir bir düğüm oluşturmak için DOMDocument::createComment() yöntemini kullanın.

Değiştirgeler

değer

Açıklama dizgesi.

Örnekler

Örnek 1 - Yeni bir DOMComment oluşturmak

<?php

$dom 
= new DOMDocument('1.0''utf-8');
$element $dom->appendChild(new DOMElement('root'));
$comment $element->appendChild(new DOMComment('bir açıklama'));
echo 
$dom->saveXML();

?>

Yukarıdaki örneğin çıktısı:

<?xml version="1.0" encoding="iso-8859-1"?>
<root><!-- bir açıklama --></root>

Ayrıca Bakınız



add a note add a note User Contributed Notes DOMComment::__construct
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites