아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 430 | 19년 전 | 4128 | ||
| 429 | 19년 전 | 3322 | ||
| 428 | 19년 전 | 4143 | ||
| 427 | 19년 전 | 3490 | ||
| 426 | 19년 전 | 3116 | ||
| 425 | 19년 전 | 3430 | ||
| 424 | 19년 전 | 2451 | ||
| 423 | 19년 전 | 2880 | ||
| 422 | 19년 전 | 2370 | ||
| 421 | 19년 전 | 3722 | ||
| 420 | 19년 전 | 4755 | ||
| 419 | 19년 전 | 3831 | ||
| 418 |
|
19년 전 | 1765 | |
| 417 | 19년 전 | 2764 | ||
| 416 | 19년 전 | 2408 | ||
| 415 | 19년 전 | 2613 | ||
| 414 | 19년 전 | 4430 | ||
| 413 |
|
19년 전 | 2623 | |
| 412 | 19년 전 | 3065 | ||
| 411 |
|
19년 전 | 3001 | |
| 410 |
|
19년 전 | 3707 | |
| 409 |
|
19년 전 | 3651 | |
| 408 |
|
19년 전 | 1871 | |
| 407 | 19년 전 | 2242 | ||
| 406 | 19년 전 | 2810 | ||
| 405 | 19년 전 | 2475 | ||
| 404 | 19년 전 | 4323 | ||
| 403 | 19년 전 | 3315 | ||
| 402 |
NeoGenesis
|
19년 전 | 4111 | |
| 401 | 19년 전 | 2619 | ||
| 400 |
|
19년 전 | 2526 | |
| 399 | 19년 전 | 2976 | ||
| 398 | 19년 전 | 2510 | ||
| 397 | 19년 전 | 2802 | ||
| 396 | 19년 전 | 2508 | ||
| 395 | 19년 전 | 3216 | ||
| 394 | 19년 전 | 1759 | ||
| 393 | 19년 전 | 3011 | ||
| 392 | 19년 전 | 2287 | ||
| 391 | 19년 전 | 2191 | ||
| 390 | 19년 전 | 2301 | ||
| 389 | 19년 전 | 2661 | ||
| 388 | 19년 전 | 2209 | ||
| 387 | 19년 전 | 4494 | ||
| 386 |
|
19년 전 | 2701 | |
| 385 |
|
19년 전 | 2509 | |
| 384 | 19년 전 | 3051 | ||
| 383 | 19년 전 | 3077 | ||
| 382 | 19년 전 | 3123 | ||
| 381 |
|
19년 전 | 2650 | |
| 380 |
|
19년 전 | 3034 | |
| 379 | 19년 전 | 2558 | ||
| 378 | 19년 전 | 2230 | ||
| 377 | 19년 전 | 2793 | ||
| 376 | 19년 전 | 2478 | ||
| 375 |
|
19년 전 | 2576 | |
| 374 | 19년 전 | 3835 | ||
| 373 | 19년 전 | 3287 | ||
| 372 | 19년 전 | 5011 | ||
| 371 |
세은아빠2
|
19년 전 | 2432 | |
| 370 | 19년 전 | 4512 | ||
| 369 | 19년 전 | 3121 | ||
| 368 | 19년 전 | 2920 | ||
| 367 | 19년 전 | 3746 | ||
| 366 | 19년 전 | 2671 | ||
| 365 | 19년 전 | 3757 | ||
| 364 | 19년 전 | 4033 | ||
| 363 | 19년 전 | 3467 | ||
| 362 | 19년 전 | 3501 | ||
| 361 | 20년 전 | 4124 | ||
| 360 |
hwatta
|
20년 전 | 2381 | |
| 359 | 20년 전 | 5124 | ||
| 358 | 20년 전 | 3675 | ||
| 357 | 20년 전 | 2620 | ||
| 356 |
sdesign1s
|
20년 전 | 2299 | |
| 355 | 20년 전 | 2778 | ||
| 354 | 20년 전 | 3041 | ||
| 353 | 20년 전 | 2807 | ||
| 352 |
|
20년 전 | 5788 | |
| 351 |
|
20년 전 | 2725 | |
| 350 |
|
20년 전 | 4314 | |
| 349 |
hwatta
|
20년 전 | 2205 | |
| 348 | 20년 전 | 7319 | ||
| 347 | 20년 전 | 2426 | ||
| 346 | 20년 전 | 3522 | ||
| 345 | 20년 전 | 4326 | ||
| 344 | 20년 전 | 2673 | ||
| 343 | 20년 전 | 3936 | ||
| 342 | 20년 전 | 3081 | ||
| 341 | 20년 전 | 4112 | ||
| 340 |
|
20년 전 | 5168 | |
| 339 |
|
20년 전 | 4253 | |
| 338 | 20년 전 | 5898 | ||
| 337 | 20년 전 | 2058 | ||
| 336 |
|
20년 전 | 3351 | |
| 335 |
|
20년 전 | 3567 | |
| 334 |
|
20년 전 | 2963 | |
| 333 |
hwatta
|
20년 전 | 2467 | |
| 332 | 20년 전 | 4671 | ||
| 331 | 20년 전 | 2293 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기