PHP Classes

File: myEngine/sample2.php

Recommend this page to a friend!
  Classes of Tereshchenko Andrey   myEngine   myEngine/sample2.php   Download  
File: myEngine/sample2.php
Role: Example script
Content type: text/plain
Description: addition example
Class: myEngine
Illustration of use XML/XSLT technology with PHP.
Author: By
Last change:
Date: 20 years ago
Size: 687 bytes
 

Contents

Class file image Download
<?php

/**
* This sample script is used main script.
*/
$book = $_DOC->createElement('book');
$title =& $_DOC->createElement('title');
$text =& $_DOC->createTextNode('This row added in external script');
$title->appendChild(&$text);
$book->appendChild(&$title);
$author =& $_DOC->createElement('author');
$text =& $_DOC->createTextNode('sample2.php by method');
$author->appendChild(&$text);
$book->appendChild(&$author);
$price = & $_DOC->createElement('price');
$text =& $_DOC->createTextNode('myEngine::run()');
$price->appendChild(&$text);
$book->appendChild(&$price);

// Set the $_SCRIPT_RESULT variable to include script result.
$_SCRIPT_RESULT =& $book;

?>