아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7530 | 10년 전 | 820 | ||
| 7529 |
파랑새1597
|
10년 전 | 1247 | |
| 7528 |
파랑새1597
|
10년 전 | 1335 | |
| 7527 |
integrity7
|
10년 전 | 1417 | |
| 7526 | 10년 전 | 2442 | ||
| 7525 |
다빈치코드777
|
10년 전 | 1124 | |
| 7524 | 10년 전 | 1591 | ||
| 7523 | 10년 전 | 980 | ||
| 7522 |
|
10년 전 | 1008 | |
| 7521 |
blackkil
|
10년 전 | 1896 | |
| 7520 | 10년 전 | 1313 | ||
| 7519 |
Gaumi
|
10년 전 | 1094 | |
| 7518 | 10년 전 | 1504 | ||
| 7517 | 10년 전 | 843 | ||
| 7516 | 10년 전 | 1311 | ||
| 7515 | 10년 전 | 1429 | ||
| 7514 |
|
10년 전 | 4500 | |
| 7513 |
멋진남자임
|
10년 전 | 1140 | |
| 7512 |
다빈치코드777
|
10년 전 | 891 | |
| 7511 |
|
10년 전 | 3417 | |
| 7510 | 10년 전 | 1382 | ||
| 7509 | 10년 전 | 1162 | ||
| 7508 | 10년 전 | 729 | ||
| 7507 |
senseme
|
10년 전 | 772 | |
| 7506 |
멋진남자임
|
10년 전 | 1666 | |
| 7505 | 10년 전 | 4043 | ||
| 7504 | 10년 전 | 2172 | ||
| 7503 | 10년 전 | 1010 | ||
| 7502 | 10년 전 | 534 | ||
| 7501 | 10년 전 | 1463 | ||
| 7500 | 10년 전 | 1508 | ||
| 7499 | 10년 전 | 3412 | ||
| 7498 | 10년 전 | 1259 | ||
| 7497 |
dethos79
|
10년 전 | 2979 | |
| 7496 | 10년 전 | 2195 | ||
| 7495 | 10년 전 | 919 | ||
| 7494 |
CHAVO
|
10년 전 | 1157 | |
| 7493 | 10년 전 | 2670 | ||
| 7492 | 10년 전 | 1303 | ||
| 7491 | 10년 전 | 1512 | ||
| 7490 | 10년 전 | 2364 | ||
| 7489 | 10년 전 | 2133 | ||
| 7488 |
toptopon
|
10년 전 | 917 | |
| 7487 |
|
10년 전 | 1061 | |
| 7486 | 10년 전 | 3376 | ||
| 7485 | 10년 전 | 1331 | ||
| 7484 | 10년 전 | 1386 | ||
| 7483 | 10년 전 | 1044 | ||
| 7482 | 10년 전 | 677 | ||
| 7481 | 10년 전 | 868 | ||
| 7480 | 10년 전 | 1250 | ||
| 7479 | 10년 전 | 2622 | ||
| 7478 | 10년 전 | 1186 | ||
| 7477 |
멋진남자임
|
10년 전 | 1535 | |
| 7476 |
zeppeto
|
10년 전 | 1151 | |
| 7475 |
200점아빠
|
10년 전 | 932 | |
| 7474 | 10년 전 | 4020 | ||
| 7473 | 10년 전 | 1008 | ||
| 7472 |
나르시스1
|
10년 전 | 1257 | |
| 7471 | 10년 전 | 889 | ||
| 7470 | 10년 전 | 1307 | ||
| 7469 |
플라이SINJI
|
10년 전 | 1018 | |
| 7468 |
|
10년 전 | 578 | |
| 7467 |
|
10년 전 | 696 | |
| 7466 | 10년 전 | 1151 | ||
| 7465 | 10년 전 | 1202 | ||
| 7464 |
|
10년 전 | 1216 | |
| 7463 | 10년 전 | 1278 | ||
| 7462 |
진짜별사탕
|
10년 전 | 881 | |
| 7461 | 10년 전 | 968 | ||
| 7460 | 10년 전 | 3761 | ||
| 7459 |
멋진남자임
|
10년 전 | 1578 | |
| 7458 |
멋진남자임
|
10년 전 | 505 | |
| 7457 | 10년 전 | 934 | ||
| 7456 | 10년 전 | 783 | ||
| 7455 | 10년 전 | 2194 | ||
| 7454 | 10년 전 | 645 | ||
| 7453 | 10년 전 | 853 | ||
| 7452 |
중국어사이트제작
|
10년 전 | 516 | |
| 7451 | 10년 전 | 924 | ||
| 7450 | 10년 전 | 648 | ||
| 7449 |
울라라라우
|
10년 전 | 967 | |
| 7448 | 10년 전 | 1642 | ||
| 7447 |
멋진남자임
|
10년 전 | 526 | |
| 7446 | 10년 전 | 569 | ||
| 7445 |
네이비칼라
|
10년 전 | 1706 | |
| 7444 |
senseme
|
10년 전 | 1424 | |
| 7443 | 11년 전 | 1353 | ||
| 7442 | 11년 전 | 746 | ||
| 7441 |
멋진남자임
|
11년 전 | 1457 | |
| 7440 | 11년 전 | 932 | ||
| 7439 |
|
11년 전 | 787 | |
| 7438 |
|
11년 전 | 956 | |
| 7437 |
basement
|
11년 전 | 1051 | |
| 7436 |
잘살아보자
|
11년 전 | 1147 | |
| 7435 | 11년 전 | 1105 | ||
| 7434 | 11년 전 | 3801 | ||
| 7433 |
|
11년 전 | 2771 | |
| 7432 |
alexkim
|
11년 전 | 876 | |
| 7431 |
이웃집초보
|
11년 전 | 1326 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기