16 define(
'HTML_EOL' ,
'<br>' . PHP_EOL );
20 define(
'XHTML_EOL' ,
'<\br>' . PHP_EOL );
24 define(
'MIME_TEXT_PLAIN' ,
'text/plain' );
25 define(
'MIME_TEXT_HTML' ,
'text/html' );
26 define(
'MIME_APPLICATION_JSON' ,
'application/json' );
27 define(
'MIME_APPLICATION_XML' ,
'application/xml' );
28 define(
'MIME_MULTIPART_FORM_DATA' ,
'multipart/form-data' );
31 define(
'ENCODING_UTF8' ,
'utf-8' );
44 if( ! empty( json_last_error() ) ) {
logWrite(
'errore #'.json_last_error().
' '.json_last_error_msg(),
'json', LOG_ERR ); }
84 header(
'Content-type: text/plain;' );
100 $dom =
new DOMImplementation;
101 $doctype = $dom->createDocumentType(
"html",
"-//W3C//DTD HTML 4.01//EN",
"http://www.w3.org/TR/html4/strict.dtd");
102 $document = $dom->createDocument( NULL,
'html', $doctype );
104 $document->preserveWhiteSpace =
false;
105 $document->formatOutput =
true;
107 $html = $document->documentElement;
108 $head = $document->createElement(
'head');
109 $title = $document->createElement(
'title');
110 $text = $document->createTextNode(
'documento generato '.date(
'r'));
111 $body = $document->createElement(
'body');
113 $contentFragment = $document->createDocumentFragment();
114 $contentFragment->appendXML( $content );
116 $title->appendChild( $text );
117 $head->appendChild( $title );
118 $html->appendChild( $head );
119 $html->appendChild( $body );
120 $body->appendChild( $contentFragment );
logWrite( $m, $f='site', $l=LOG_NOTICE, $d=DIRECTORY_LOG, $t=CURRENT_LOG_LEVEL, $s=SITE_STATUS)
scrive un messaggio nei log del sito