아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 PHP와MySQL"제3판의 소스입니다.
에러문구는
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\APM_Setup\htdocs\chapter6\page.inc on line 116
=================
아래 : page.inc 소스
=================
<?php
class Page
{
// Page 클래스의 속성
public $content;
public $title = 'TLA Consulting Pty Ltd';
public $keywords = 'TLA Consulting, Three Letter Abbreviation,
some of my best friends are search engines';
public $buttons = array( 'Home' => 'home.php',
'Contact' => 'contact.php',
'Services' => 'services.php',
'Site Map' => 'map.php'
);
// Page 클래스의 연산
public function __set($name, $value)
{
$this->$name = $value;
}
public function Display()
{
echo "<html>\n<head>\n";
$this -> DisplayTitle();
$this -> DisplayKeywords();
$this -> DisplayStyles();
echo "</head>\n<body>\n";
$this -> DisplayHeader();
$this -> DisplayMenu($this->buttons);
echo $this->content;
$this -> DisplayFooter();
echo "</body>\n</html>\n";
}
public function DisplayTitle()
{
echo '<title> '.$this->title.' </title>';
}
public function DisplayKeywords()
{
echo "<meta name=\"keywords\" content=\"".
"htmlentities($this->keywords)\" />";
}
public function DisplayStyles()
{
?>
<!--
<style>
h1 {color:white; font-size:24pt; text-align:center;
font-family:arial,sans-serif}
.menu {color:white; font-size:12pt; text-align:center;
font-family:arial,sans-serif; font-weight:bold}
td {background:black}
p {color:black; font-size:12pt; text-align:justify;
font-family:arial,sans-serif}
p.foot {color:white; font-size:9pt; text-align:center;
font-family:arial,sans-serif; font-weight:bold}
a:link,a:visited,a:active {color:white}
</style>
-->
<?php
}
public function DisplayHeader()
{
?>
<table width="100%" cellpadding ="12" cellspacing ="0" border ="0">
<tr bgcolor ="black">
<td align ="left"><img src = "logo.gif" /></td>
<td>
<h1>TLA Consulting Pty Ltd</h1>
</td>
<td align ="right"><img src = "logo.gif" /></td>
</tr>
</table>
<?php
}
public function DisplayMenu($buttons)
{
echo "<table width='100%' bgcolor='white' cellpadding='4'
cellspacing='4'>\n";
echo " <tr>\n";
//버튼의 크기를 계산한다.
$width = 100/count($buttons);
foreach ($buttons as $name=>$url)
{
$this -> DisplayButton($width, $name, $url, !$this->IsURLCurrentPage($url));
}
echo " </tr>\n";
echo "</table>\n";
}
public function IsURLCurrentPage($url)
{
if(strpos($_SERVER['PHP_SELF'], $url )==false)
{
return false;
}
else
{
return true;
}
}
public function DisplayButton($width, $name, $url, $active = true)
{
if ($active)
{
echo "<td width ='".htmlentities($width)."%'>
<a href ='".htmlentities($url)"'>
<img src ='s-logo.gif' alt ='".htmlentities($name)"' border ='0' /></a>
<a href ='$url'><span class='menu'>$name</span></a></td>";
}
else
{
echo "<td width ='".htmlentities($width)"%'>
<img src ='side-logo.gif'>
<span class='menu'>$name</span></td>";
}
}
public function DisplayFooter()
{
?>
<table width = "100%" bgcolor ="black" cellpadding ="12" border ="0">
<tr>
<td>
<p class="foot">© TLA Consulting Pty Ltd.</p>
<p class="foot">Please see our
<a href ="legal.php">legal information page</a></p>
</td>
</tr>
</table>
<?php
}
}
?>
댓글 2개
<img src ='s-logo.gif' alt ='".htmlentities($name)"' border ='0' /></a>
->
<img src ='s-logo.gif' alt ='".htmlentities($name)."' border ='0' /></a>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1730 | 17년 전 | 1182 | ||
| 1729 | 17년 전 | 1615 | ||
| 1728 | 17년 전 | 1683 | ||
| 1727 | 17년 전 | 1819 | ||
| 1726 | 17년 전 | 2956 | ||
| 1725 | 17년 전 | 2093 | ||
| 1724 |
|
17년 전 | 1772 | |
| 1723 |
끝없는사랑
|
17년 전 | 2114 | |
| 1722 |
끝없는사랑
|
17년 전 | 1823 | |
| 1721 | 17년 전 | 3350 | ||
| 1720 | 17년 전 | 1535 | ||
| 1719 | 17년 전 | 1652 | ||
| 1718 |
사랑합니다
|
17년 전 | 1369 | |
| 1717 | 17년 전 | 2192 | ||
| 1716 | 17년 전 | 3144 | ||
| 1715 |
|
17년 전 | 2282 | |
| 1714 |
|
17년 전 | 1736 | |
| 1713 | 17년 전 | 2993 | ||
| 1712 | 17년 전 | 4431 | ||
| 1711 | 17년 전 | 1740 | ||
| 1710 | 17년 전 | 3242 | ||
| 1709 |
jeans
|
17년 전 | 1568 | |
| 1708 |
|
17년 전 | 3476 | |
| 1707 | 17년 전 | 5843 | ||
| 1706 |
|
17년 전 | 1420 | |
| 1705 |
|
17년 전 | 2160 | |
| 1704 | 17년 전 | 1794 | ||
| 1703 |
심심맨닷컴
|
17년 전 | 1553 | |
| 1702 | 17년 전 | 2428 | ||
| 1701 |
|
17년 전 | 2632 | |
| 1700 | 17년 전 | 1601 | ||
| 1699 | 17년 전 | 2683 | ||
| 1698 |
RedRiverFisher
|
17년 전 | 3173 | |
| 1697 |
심심맨닷컴
|
17년 전 | 1530 | |
| 1696 |
eclub
|
17년 전 | 1942 | |
| 1695 | 17년 전 | 3852 | ||
| 1694 |
깜장고무신
|
17년 전 | 4483 | |
| 1693 |
stuartkim
|
17년 전 | 1884 | |
| 1692 |
stuartkim
|
17년 전 | 1752 | |
| 1691 |
|
17년 전 | 2681 | |
| 1690 | 17년 전 | 1848 | ||
| 1689 | 17년 전 | 3937 | ||
| 1688 | 17년 전 | 1656 | ||
| 1687 | 16년 전 | 1932 | ||
| 1686 |
|
17년 전 | 2261 | |
| 1685 | 17년 전 | 2111 | ||
| 1684 |
|
17년 전 | 3573 | |
| 1683 |
leeLook
|
17년 전 | 1594 | |
| 1682 | 17년 전 | 2657 | ||
| 1681 | 17년 전 | 1646 | ||
| 1680 | 17년 전 | 1911 | ||
| 1679 | 17년 전 | 7425 | ||
| 1678 | 17년 전 | 1997 | ||
| 1677 | 17년 전 | 4094 | ||
| 1676 | 17년 전 | 2419 | ||
| 1675 | 17년 전 | 2429 | ||
| 1674 | 17년 전 | 2151 | ||
| 1673 | 17년 전 | 2197 | ||
| 1672 | 17년 전 | 2626 | ||
| 1671 | 17년 전 | 3221 | ||
| 1670 | 17년 전 | 5332 | ||
| 1669 |
플래시007
|
17년 전 | 2786 | |
| 1668 |
|
17년 전 | 2699 | |
| 1667 | 17년 전 | 2554 | ||
| 1666 |
|
17년 전 | 1797 | |
| 1665 | 17년 전 | 2208 | ||
| 1664 | 17년 전 | 5310 | ||
| 1663 |
|
17년 전 | 3024 | |
| 1662 |
|
17년 전 | 2582 | |
| 1661 |
|
17년 전 | 3256 | |
| 1660 |
|
17년 전 | 2475 | |
| 1659 |
|
17년 전 | 2832 | |
| 1658 | 17년 전 | 5879 | ||
| 1657 | 17년 전 | 2635 | ||
| 1656 |
Piece
|
17년 전 | 2025 | |
| 1655 |
|
17년 전 | 2658 | |
| 1654 | 17년 전 | 1479 | ||
| 1653 | 17년 전 | 9803 | ||
| 1652 | 17년 전 | 4462 | ||
| 1651 | 17년 전 | 3290 | ||
| 1650 | 17년 전 | 1815 | ||
| 1649 | 17년 전 | 3606 | ||
| 1648 | 18년 전 | 2290 | ||
| 1647 | 18년 전 | 3738 | ||
| 1646 | 18년 전 | 5193 | ||
| 1645 | 18년 전 | 3847 | ||
| 1644 | 18년 전 | 2700 | ||
| 1643 | 18년 전 | 2948 | ||
| 1642 | 18년 전 | 2455 | ||
| 1641 | 18년 전 | 2794 | ||
| 1640 |
porgy
|
18년 전 | 1905 | |
| 1639 | 18년 전 | 3452 | ||
| 1638 |
컴퓨터기술자
|
18년 전 | 2144 | |
| 1637 |
|
18년 전 | 2264 | |
| 1636 | 18년 전 | 2074 | ||
| 1635 | 18년 전 | 3051 | ||
| 1634 |
귀여운현호
|
18년 전 | 2001 | |
| 1633 |
태양의서쪽
|
18년 전 | 2675 | |
| 1632 | 18년 전 | 3876 | ||
| 1631 | 18년 전 | 4571 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기