아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7630 | 10년 전 | 675 | ||
| 7629 |
|
10년 전 | 2433 | |
| 7628 | 10년 전 | 812 | ||
| 7627 |
|
10년 전 | 1050 | |
| 7626 |
|
10년 전 | 1806 | |
| 7625 | 10년 전 | 740 | ||
| 7624 | 10년 전 | 750 | ||
| 7623 |
|
10년 전 | 3133 | |
| 7622 | 10년 전 | 752 | ||
| 7621 |
leeleeleelee
|
10년 전 | 605 | |
| 7620 | 10년 전 | 555 | ||
| 7619 | 10년 전 | 522 | ||
| 7618 | 10년 전 | 1058 | ||
| 7617 | 10년 전 | 740 | ||
| 7616 | 10년 전 | 680 | ||
| 7615 | 10년 전 | 741 | ||
| 7614 | 10년 전 | 1284 | ||
| 7613 |
|
10년 전 | 2100 | |
| 7612 | 10년 전 | 1182 | ||
| 7611 | 10년 전 | 1447 | ||
| 7610 |
|
10년 전 | 1923 | |
| 7609 |
|
10년 전 | 1378 | |
| 7608 |
mwdkim
|
10년 전 | 1152 | |
| 7607 |
|
10년 전 | 1081 | |
| 7606 |
mwdkim
|
10년 전 | 3957 | |
| 7605 | 10년 전 | 706 | ||
| 7604 | 10년 전 | 1044 | ||
| 7603 | 10년 전 | 1664 | ||
| 7602 |
|
10년 전 | 1097 | |
| 7601 |
AniNest
|
10년 전 | 2811 | |
| 7600 |
port443
|
10년 전 | 1055 | |
| 7599 | 10년 전 | 962 | ||
| 7598 | 10년 전 | 1041 | ||
| 7597 | 10년 전 | 4590 | ||
| 7596 |
SeungYeon
|
10년 전 | 911 | |
| 7595 |
untitled
|
10년 전 | 2459 | |
| 7594 |
프로그래머7
|
10년 전 | 1749 | |
| 7593 |
untitled
|
10년 전 | 2392 | |
| 7592 |
untitled
|
10년 전 | 1957 | |
| 7591 |
untitled
|
10년 전 | 2694 | |
| 7590 |
아리마2001
|
10년 전 | 872 | |
| 7589 | 10년 전 | 1124 | ||
| 7588 |
|
10년 전 | 2939 | |
| 7587 | 10년 전 | 1320 | ||
| 7586 | 10년 전 | 687 | ||
| 7585 | 10년 전 | 1724 | ||
| 7584 | 10년 전 | 1424 | ||
| 7583 |
leeleeleelee
|
10년 전 | 1190 | |
| 7582 |
|
10년 전 | 1151 | |
| 7581 | 10년 전 | 1380 | ||
| 7580 | 10년 전 | 1033 | ||
| 7579 |
|
10년 전 | 622 | |
| 7578 | 10년 전 | 1444 | ||
| 7577 |
|
10년 전 | 1890 | |
| 7576 | 10년 전 | 1401 | ||
| 7575 |
멋진남자임
|
10년 전 | 1483 | |
| 7574 | 10년 전 | 2147 | ||
| 7573 | 10년 전 | 3282 | ||
| 7572 | 10년 전 | 779 | ||
| 7571 |
|
10년 전 | 797 | |
| 7570 |
|
10년 전 | 1341 | |
| 7569 | 10년 전 | 1567 | ||
| 7568 |
this1mg
|
10년 전 | 1065 | |
| 7567 |
|
10년 전 | 785 | |
| 7566 | 10년 전 | 930 | ||
| 7565 |
Angel하늘
|
10년 전 | 1034 | |
| 7564 |
seoldi
|
10년 전 | 1279 | |
| 7563 |
|
10년 전 | 1418 | |
| 7562 |
멋진남자임
|
10년 전 | 2118 | |
| 7561 | 10년 전 | 739 | ||
| 7560 |
leeleeleelee
|
10년 전 | 934 | |
| 7559 | 10년 전 | 5072 | ||
| 7558 |
RinaP
|
10년 전 | 812 | |
| 7557 |
|
10년 전 | 1272 | |
| 7556 | 10년 전 | 1213 | ||
| 7555 |
hyohyojj1234
|
10년 전 | 1681 | |
| 7554 | 10년 전 | 1109 | ||
| 7553 |
senseme
|
10년 전 | 1360 | |
| 7552 |
ehdltdoit
|
10년 전 | 1456 | |
| 7551 |
|
10년 전 | 1846 | |
| 7550 |
leeleeleelee
|
10년 전 | 1617 | |
| 7549 | 10년 전 | 2448 | ||
| 7548 | 10년 전 | 1856 | ||
| 7547 |
멋진남자임
|
10년 전 | 1979 | |
| 7546 | 10년 전 | 1022 | ||
| 7545 |
ILMare1003
|
10년 전 | 1315 | |
| 7544 |
|
10년 전 | 1268 | |
| 7543 | 10년 전 | 903 | ||
| 7542 | 10년 전 | 682 | ||
| 7541 |
울라라라우
|
10년 전 | 885 | |
| 7540 | 10년 전 | 1608 | ||
| 7539 | 10년 전 | 958 | ||
| 7538 |
|
10년 전 | 1846 | |
| 7537 | 10년 전 | 3632 | ||
| 7536 |
Gaumi
|
10년 전 | 1443 | |
| 7535 |
프로그램은어려워
|
10년 전 | 1299 | |
| 7534 |
senseme
|
10년 전 | 1219 | |
| 7533 | 10년 전 | 1223 | ||
| 7532 | 10년 전 | 890 | ||
| 7531 | 10년 전 | 2080 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기