아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7430 |
|
11년 전 | 4947 | |
| 7429 | 11년 전 | 1780 | ||
| 7428 |
멋진남자임
|
11년 전 | 1174 | |
| 7427 |
sdflksdj2
|
11년 전 | 832 | |
| 7426 | 11년 전 | 1366 | ||
| 7425 | 11년 전 | 1393 | ||
| 7424 | 11년 전 | 1054 | ||
| 7423 |
SeungYeon
|
11년 전 | 565 | |
| 7422 | 11년 전 | 811 | ||
| 7421 |
sdflksdj2
|
11년 전 | 691 | |
| 7420 | 11년 전 | 974 | ||
| 7419 |
|
11년 전 | 1405 | |
| 7418 |
멋진남자임
|
11년 전 | 1444 | |
| 7417 | 11년 전 | 608 | ||
| 7416 |
senseme
|
11년 전 | 1233 | |
| 7415 | 11년 전 | 963 | ||
| 7414 | 11년 전 | 715 | ||
| 7413 | 11년 전 | 4852 | ||
| 7412 | 11년 전 | 4408 | ||
| 7411 |
holla
|
11년 전 | 898 | |
| 7410 | 11년 전 | 4254 | ||
| 7409 | 11년 전 | 3929 | ||
| 7408 | 11년 전 | 4273 | ||
| 7407 | 11년 전 | 5091 | ||
| 7406 | 11년 전 | 4737 | ||
| 7405 | 11년 전 | 4303 | ||
| 7404 | 11년 전 | 765 | ||
| 7403 | 11년 전 | 5685 | ||
| 7402 | 11년 전 | 1523 | ||
| 7401 |
|
11년 전 | 980 | |
| 7400 | 11년 전 | 2976 | ||
| 7399 |
멋진남자임
|
11년 전 | 921 | |
| 7398 |
파랑새1597
|
11년 전 | 2709 | |
| 7397 | 11년 전 | 2278 | ||
| 7396 |
basketball
|
11년 전 | 1379 | |
| 7395 | 11년 전 | 1617 | ||
| 7394 | 11년 전 | 935 | ||
| 7393 | 11년 전 | 2076 | ||
| 7392 | 11년 전 | 852 | ||
| 7391 |
잘살아보자
|
11년 전 | 5366 | |
| 7390 |
잘살아보자
|
11년 전 | 2231 | |
| 7389 |
잘살아보자
|
11년 전 | 3324 | |
| 7388 |
파랑새1597
|
11년 전 | 932 | |
| 7387 | 11년 전 | 1108 | ||
| 7386 |
프리랜서퍼블리셔
|
11년 전 | 974 | |
| 7385 | 11년 전 | 1572 | ||
| 7384 |
울라라라우
|
11년 전 | 894 | |
| 7383 | 11년 전 | 1559 | ||
| 7382 |
잘살아보자
|
11년 전 | 4230 | |
| 7381 |
잘살아보자
|
11년 전 | 2002 | |
| 7380 |
잘살아보자
|
11년 전 | 1946 | |
| 7379 |
잘살아보자
|
11년 전 | 5912 | |
| 7378 |
senseme
|
11년 전 | 1903 | |
| 7377 |
잘살아보자
|
11년 전 | 2752 | |
| 7376 | 11년 전 | 2421 | ||
| 7375 |
잘살아보자
|
11년 전 | 1054 | |
| 7374 |
잘살아보자
|
11년 전 | 3166 | |
| 7373 |
잘살아보자
|
11년 전 | 2483 | |
| 7372 |
잘살아보자
|
11년 전 | 5834 | |
| 7371 |
잘살아보자
|
11년 전 | 3470 | |
| 7370 |
잘살아보자
|
11년 전 | 1917 | |
| 7369 |
잘살아보자
|
11년 전 | 2175 | |
| 7368 |
ksdhtm56
|
11년 전 | 575 | |
| 7367 | 11년 전 | 1440 | ||
| 7366 | 11년 전 | 938 | ||
| 7365 | 11년 전 | 3552 | ||
| 7364 |
잘살아보자
|
11년 전 | 1401 | |
| 7363 |
잘살아보자
|
11년 전 | 1376 | |
| 7362 |
잘살아보자
|
11년 전 | 1517 | |
| 7361 | 11년 전 | 3602 | ||
| 7360 | 11년 전 | 3567 | ||
| 7359 | 11년 전 | 3385 | ||
| 7358 |
멋진남자임
|
11년 전 | 1035 | |
| 7357 | 11년 전 | 3419 | ||
| 7356 | 11년 전 | 2608 | ||
| 7355 | 11년 전 | 3200 | ||
| 7354 |
파랑새1597
|
11년 전 | 655 | |
| 7353 |
잘살아보자
|
11년 전 | 2431 | |
| 7352 |
잘살아보자
|
11년 전 | 2422 | |
| 7351 |
잘살아보자
|
11년 전 | 2484 | |
| 7350 |
잘살아보자
|
11년 전 | 1479 | |
| 7349 |
잘살아보자
|
11년 전 | 1971 | |
| 7348 |
잘살아보자
|
11년 전 | 1288 | |
| 7347 |
잘살아보자
|
11년 전 | 1084 | |
| 7346 |
멋진남자임
|
11년 전 | 1652 | |
| 7345 | 11년 전 | 997 | ||
| 7344 | 11년 전 | 3881 | ||
| 7343 | 11년 전 | 3664 | ||
| 7342 | 11년 전 | 1288 | ||
| 7341 | 11년 전 | 2526 | ||
| 7340 |
|
11년 전 | 941 | |
| 7339 | 11년 전 | 1740 | ||
| 7338 | 11년 전 | 3352 | ||
| 7337 | 11년 전 | 3666 | ||
| 7336 | 11년 전 | 4606 | ||
| 7335 | 11년 전 | 983 | ||
| 7334 | 11년 전 | 1540 | ||
| 7333 | 11년 전 | 2944 | ||
| 7332 |
|
11년 전 | 1115 | |
| 7331 |
KeePin뽁이
|
11년 전 | 1108 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기