아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2430 | 15년 전 | 2505 | ||
| 2429 | 15년 전 | 5497 | ||
| 2428 | 15년 전 | 1461 | ||
| 2427 |
Sizkein
|
15년 전 | 4228 | |
| 2426 | 15년 전 | 1355 | ||
| 2425 | 15년 전 | 1653 | ||
| 2424 | 15년 전 | 1630 | ||
| 2423 |
haejuksun
|
15년 전 | 1621 | |
| 2422 |
haejuksun
|
15년 전 | 1123 | |
| 2421 |
haejuksun
|
15년 전 | 1370 | |
| 2420 |
haejuksun
|
15년 전 | 1517 | |
| 2419 |
|
15년 전 | 1414 | |
| 2418 |
|
15년 전 | 2139 | |
| 2417 |
원더풀라입
|
15년 전 | 1291 | |
| 2416 |
원더풀라입
|
15년 전 | 1349 | |
| 2415 |
원더풀라입
|
15년 전 | 878 | |
| 2414 |
원더풀라입
|
15년 전 | 997 | |
| 2413 |
원더풀라입
|
15년 전 | 958 | |
| 2412 |
원더풀라입
|
15년 전 | 923 | |
| 2411 |
원더풀라입
|
15년 전 | 872 | |
| 2410 |
원더풀라입
|
15년 전 | 925 | |
| 2409 |
원더풀라입
|
15년 전 | 1075 | |
| 2408 |
원더풀라입
|
15년 전 | 1085 | |
| 2407 |
원더풀라입
|
15년 전 | 2606 | |
| 2406 |
원더풀라입
|
15년 전 | 945 | |
| 2405 |
원더풀라입
|
15년 전 | 1598 | |
| 2404 |
원더풀라입
|
15년 전 | 1464 | |
| 2403 | 15년 전 | 1589 | ||
| 2402 | 15년 전 | 1292 | ||
| 2401 |
나도빌더만들까
|
15년 전 | 1775 | |
| 2400 | 15년 전 | 597 | ||
| 2399 | 15년 전 | 1088 | ||
| 2398 | 15년 전 | 1052 | ||
| 2397 | 15년 전 | 2838 | ||
| 2396 | 15년 전 | 3151 | ||
| 2395 | 15년 전 | 1830 | ||
| 2394 | 15년 전 | 1336 | ||
| 2393 |
gamebomb
|
15년 전 | 1957 | |
| 2392 |
gamebomb
|
15년 전 | 1469 | |
| 2391 |
gamebomb
|
15년 전 | 1072 | |
| 2390 | 15년 전 | 3767 | ||
| 2389 |
leadK
|
15년 전 | 1409 | |
| 2388 |
kim7031
|
15년 전 | 1520 | |
| 2387 | 15년 전 | 2736 | ||
| 2386 | 15년 전 | 1447 | ||
| 2385 | 15년 전 | 4168 | ||
| 2384 |
확실한방법
|
15년 전 | 2376 | |
| 2383 |
intel
|
15년 전 | 3150 | |
| 2382 |
확실한방법
|
15년 전 | 1767 | |
| 2381 |
|
15년 전 | 1989 | |
| 2380 |
|
15년 전 | 1301 | |
| 2379 | 15년 전 | 4373 | ||
| 2378 | 15년 전 | 3949 | ||
| 2377 |
메가팩토리
|
15년 전 | 3777 | |
| 2376 | 15년 전 | 5187 | ||
| 2375 | 15년 전 | 3409 | ||
| 2374 | 15년 전 | 1789 | ||
| 2373 | 15년 전 | 1750 | ||
| 2372 | 15년 전 | 1888 | ||
| 2371 | 15년 전 | 1592 | ||
| 2370 | 15년 전 | 3989 | ||
| 2369 | 15년 전 | 2902 | ||
| 2368 | 15년 전 | 2095 | ||
| 2367 | 15년 전 | 1663 | ||
| 2366 | 15년 전 | 1906 | ||
| 2365 | 15년 전 | 2395 | ||
| 2364 | 15년 전 | 1478 | ||
| 2363 | 15년 전 | 2413 | ||
| 2362 | 15년 전 | 1738 | ||
| 2361 | 15년 전 | 1833 | ||
| 2360 | 15년 전 | 1481 | ||
| 2359 | 15년 전 | 2178 | ||
| 2358 | 15년 전 | 1503 | ||
| 2357 |
|
15년 전 | 1920 | |
| 2356 |
헐크매니아
|
15년 전 | 2117 | |
| 2355 |
WebRIA
|
15년 전 | 1196 | |
| 2354 |
WebRIA
|
15년 전 | 1248 | |
| 2353 |
WebRIA
|
15년 전 | 1893 | |
| 2352 |
WebRIA
|
15년 전 | 5334 | |
| 2351 | 15년 전 | 1635 | ||
| 2350 |
WebRIA
|
15년 전 | 2142 | |
| 2349 | 15년 전 | 2340 | ||
| 2348 |
WebRIA
|
15년 전 | 1492 | |
| 2347 |
WebRIA
|
15년 전 | 1301 | |
| 2346 |
WebRIA
|
15년 전 | 2218 | |
| 2345 |
WebRIA
|
15년 전 | 4935 | |
| 2344 | 15년 전 | 2204 | ||
| 2343 | 15년 전 | 2863 | ||
| 2342 | 15년 전 | 1751 | ||
| 2341 | 15년 전 | 3595 | ||
| 2340 | 15년 전 | 4433 | ||
| 2339 | 16년 전 | 3115 | ||
| 2338 | 16년 전 | 2353 | ||
| 2337 | 16년 전 | 2434 | ||
| 2336 | 16년 전 | 2685 | ||
| 2335 | 16년 전 | 2178 | ||
| 2334 |
Sizkein
|
16년 전 | 5515 | |
| 2333 | 16년 전 | 3372 | ||
| 2332 | 16년 전 | 1361 | ||
| 2331 | 16년 전 | 1700 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기