in Deutsh
in French
in Polish

You Are At Area


recent searches:
include functions , variable functions , post functions...




If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.

PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.

PHP Manual
PrevNext

DOMDocument->save()

(no version information, might be only in CVS)

DOMDocument->save() --  Dumps the internal XML tree back into a file

Description

class DOMDocument {

mixed save ( string filename [, int options] )

}

Creates an XML document from the DOM representation. This function is usually called after building a new dom document from scratch as in the example below.

Parameters

filename

The path to the saved XML document.

options

Additional Options. Currently only LIBXML_NOEMPTYTAG is supported.

Return Values

Returns the number of bytes written or FALSE if an error occurred.

ChangeLog

VersionDescription
5.1.0 Added the options parameter

Examples

Example 1. Saving a DOM tree into a file

<?php

$doc
= new DOMDocument('1.0');
// we want a nice output
$doc->formatOutput = true;

$root = $doc->createElement('book');
$root = $doc->appendChild($root);

$title = $doc->createElement('title');
$title = $root->appendChild($title);

$text = $doc->createTextNode('This is the title');
$text = $title->appendChild($text);

echo
'Wrote: ' . $doc->save("/tmp/test.xml") . ' bytes'; // Wrote: 72 bytes

?>

See Also

DOMDocument->saveXML()
DOMDocument->load()
DOMDocument->loadXML()

szkolenia zawodowe kursy zawodowe przygotowanie do zawodu
Crm dedykowany
najlepsza strona blogs o UKS profesjonalne wyniki
Skuteczne pozycjonowanie stron łódź i cała Polska.
przetargi Adamówka

Another Useful functions:


function.dom-domxpath-registernamespace | function.dom-domxpath-query | function.dom-domxpath-evaluate | function.dom-domxpath-construct | function.dom-domtext-splittext | function.dom-domtext-iswhitespaceinelementcontent | function.dom-domtext-construct | function.dom-domprocessinginstruction-construct | function.dom-domnodelist-item | function.dom-domnode-replacechild | function.dom-domnode-removechild | function.dom-domnode-normalize | function.dom-domnode-lookupprefix | function.dom-domnode-lookupnamespaceuri | function.dom-domnode-issupported | function.dom-domnode-issamenode | function.dom-domnode-isdefaultnamespace | function.dom-domnode-insertbefore | function.dom-domnode-haschildnodes | function.dom-domnode-hasattributes | function.dom-domnode-clonenode | function.dom-domnode-appendchild | function.dom-domnamednodemap-item | function.dom-domnamednodemap-getnameditemns | function.dom-domnamednodemap-getnameditem | function.dom-domimplementation-hasfeature | function.dom-domimplementation-createdocumenttype | function.dom-domimplementation-createdocument | function.dom-domimplementation-construct | function.dom-domentityreference-construct | function.dom-domelement-setidattributens | function.dom-domelement-setidattributenode | function.dom-domelement-setidattribute | function.dom-domelement-setattributens | function.dom-domelement-setattributenodens | function.dom-domelement-setattributenode | function.dom-domelement-setattribute | function.dom-domelement-removeattributens | function.dom-domelement-removeattributenode | function.dom-domelement-removeattribute | function.dom-domelement-hasattributens | function.dom-domelement-hasattribute | function.dom-domelement-getelementsbytagnamens | function.dom-domelement-getelementsbytagname | function.dom-domelement-getattributens | function.dom-domelement-getattributenodens | function.dom-domelement-getattributenode | function.dom-domelement-getattribute | function.dom-domelement-construct | function.dom-domdocumentfragment-appendxml | function.dom-domdocument-xinclude | function.dom-domdocument-validate | function.dom-domdocument-schemavalidatesource | function.dom-domdocument-schemavalidate | function.dom-domdocument-savexml | function.dom-domdocument-savehtmlfile | function.dom-domdocument-savehtml | function.dom-domdocument-save | function.dom-domdocument-relaxngvalidatesource | function.dom-domdocument-relaxngvalidate | function.dom-domdocument-registernodeclass | function.dom-domdocument-normalizedocument | function.dom-domdocument-loadxml | function.dom-domdocument-loadhtmlfile | function.dom-domdocument-loadhtml | function.dom-domdocument-load | function.dom-domdocument-importnode | function.dom-domdocument-getelementsbytagnamens | function.dom-domdocument-getelementsbytagname | function.dom-domdocument-getelementbyid | function.dom-domdocument-createtextnode | function.dom-domdocument-createprocessinginstruction | function.dom-domdocument-createentityreference | function.dom-domdocument-createelementns | function.dom-domdocument-createelement | function.dom-domdocument-createdocumentfragment | function.dom-domdocument-createcomment | function.dom-domdocument-createcdatasection | function.dom-domdocument-createattributens | function.dom-domdocument-createattribute | function.dom-domdocument-construct | function.dom-domcomment-construct | function.dom-domcharacterdata-substringdata | function.dom-domcharacterdata-replacedata | function.dom-domcharacterdata-insertdata | function.dom-domcharacterdata-deletedata | function.dom-domcharacterdata-appenddata | function.dom-domattr-isid | function.dom-domattr-construct |


PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.