Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
header('Content-Type: application/xhtml+xml; charset=utf-8');
3
header('Vary: Accept');
4
?>
5
<?xml version="1.0" encoding="UTF-8"?>
6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
7
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
8
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
9
<head>
10
	<title>An XHTML 1.0 Strict standard template</title>
11
	<meta http-equiv="content-type" content="text/html;charset=UTF-8" />
12
	<meta http-equiv="Content-Style-Type" content="text/css" />
13
    <style>
14
 
15
        /* style for XHTML_Text */
16
        table.var_dump          { border-collapse:separate; border:1px solid black; border-spacing:0; }
17
        table.var_dump tr       { color:#006600; background:#F8F8F8; vertical-align:top; }
18
        table.var_dump tr.alt   { color:#006600; background:#E8E8E8; }
19
        table.var_dump th       { padding:4px; color:black; background:#CCCCCC; text-align:left; }
20
        table.var_dump td       { padding:4px; }
21
        table.var_dump caption  { caption-side:top; color:white; background:#339900; }
22
        table.var_dump i        { color: #000000; background: transparent; font-style: normal; }
23
 
24
        /* style for XHTML_Text */
25
        pre.var_dump            { line-height:1.8em; }
26
        pre.var_dump span.type  { color:#006600; background:transparent; }
27
        pre.var_dump span.value { padding:2px; color:#339900; background:#F0F0F0; border: 1px dashed #CCCCCC; }
28
 
29
    </style>
30
</head>
31
<body>
32
 
33
<?php
34
 
35
include_once 'Var_Dump.php';
36
 
37
echo '<h1>example4.php : Renderers</h1>';
38
 
39
/*
40
 * example4.php : Renderers
41
 *
42
 */
43
 
44
$fileHandler = tmpfile();
45
$linkedArray = array(TRUE, 123, 123.45);
46
$array = array(
47
    'key1' => 'The quick brown' . "\n" . 'fox jumped over' . "\n" . 'the lazy dog',
48
    'key2' => & $linkedArray,
49
    'key3' => NULL,
50
    'key4' => $fileHandler,
51
);
52
 
53
echo '<h2>Text</h2>';
54
Var_Dump::displayInit(array('display_mode' => 'Text'));
55
echo '<pre>';
56
$t = Var_Dump::display($array, TRUE);
57
echo str_replace('&', '&amp;', $t);
58
echo '</pre>';
59
 
60
echo '<h2>HTML4_Table</h2>';
61
Var_Dump::displayInit(array('display_mode' => 'HTML4_Table'));
62
Var_Dump::display($array);
63
 
64
echo '<h2>HTML4_Text</h2>';
65
Var_Dump::displayInit(array('display_mode' => 'HTML4_Text'));
66
Var_Dump::display($array);
67
 
68
echo '<h2>XHTML_Table</h2>';
69
Var_Dump::displayInit(array('display_mode' => 'XHTML_Table'));
70
Var_Dump::display($array);
71
 
72
echo '<h2>XHTML_Text</h2>';
73
Var_Dump::displayInit(array('display_mode' => 'XHTML_Text'));
74
Var_Dump::display($array);
75
 
76
echo '<h2>XML</h2>';
77
Var_Dump::displayInit(array('display_mode' => 'XML'));
78
echo '<pre>';
79
echo htmlspecialchars(Var_Dump::display($array, TRUE));
80
echo '</pre>';
81
 
82
fclose($fileHandler);
83
 
84
?>
85
 
86
</body>
87
</html>