Skip to content

Commit 7ca719e

Browse files
committed
AddToHead method, plus set charset to UTF-8
1 parent f588bfc commit 7ca719e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

php/Page.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Page extends Html
2424
<!DOCTYPE html>
2525
<html lang="en">
2626
<head>
27+
<meta charset="utf-8">
2728
<title>%s</title>
2829
%s
2930
</head>
@@ -118,6 +119,18 @@ public function setHead($h)
118119
}
119120
}
120121

122+
public function addToHead($h)
123+
{
124+
if (is_a($h, 'Html'))
125+
{
126+
$this->head .= $h->getHtml();
127+
}
128+
if (is_string($h))
129+
{
130+
$this->head .= $h;
131+
}
132+
}
133+
121134
public function addToLeftCol($h)
122135
{
123136
if (is_a($h, 'Html'))

0 commit comments

Comments
 (0)