아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 7730 | 10년 전 | 1313 | ||
| 7729 | 10년 전 | 1169 | ||
| 7728 |
잘살아보자
|
10년 전 | 613 | |
| 7727 |
잘살아보자
|
10년 전 | 509 | |
| 7726 |
잘살아보자
|
10년 전 | 841 | |
| 7725 |
잘살아보자
|
10년 전 | 567 | |
| 7724 |
잘살아보자
|
10년 전 | 482 | |
| 7723 |
잘살아보자
|
10년 전 | 547 | |
| 7722 |
잘살아보자
|
10년 전 | 484 | |
| 7721 |
잘살아보자
|
10년 전 | 518 | |
| 7720 |
잘살아보자
|
10년 전 | 482 | |
| 7719 |
비긴어게인
|
10년 전 | 701 | |
| 7718 |
|
10년 전 | 2547 | |
| 7717 |
잘살아보자
|
10년 전 | 665 | |
| 7716 |
잘살아보자
|
10년 전 | 412 | |
| 7715 |
잘살아보자
|
10년 전 | 443 | |
| 7714 |
잘살아보자
|
10년 전 | 506 | |
| 7713 | 10년 전 | 1790 | ||
| 7712 | 10년 전 | 1728 | ||
| 7711 | 10년 전 | 1113 | ||
| 7710 | 10년 전 | 1408 | ||
| 7709 | 10년 전 | 1527 | ||
| 7708 | 10년 전 | 1467 | ||
| 7707 | 10년 전 | 865 | ||
| 7706 |
별지기천사
|
10년 전 | 580 | |
| 7705 | 10년 전 | 1084 | ||
| 7704 |
ICONdesignstudio
|
10년 전 | 636 | |
| 7703 | 10년 전 | 602 | ||
| 7702 |
|
10년 전 | 739 | |
| 7701 | 10년 전 | 1429 | ||
| 7700 | 10년 전 | 1116 | ||
| 7699 | 10년 전 | 586 | ||
| 7698 | 10년 전 | 1156 | ||
| 7697 | 10년 전 | 5180 | ||
| 7696 | 10년 전 | 670 | ||
| 7695 | 10년 전 | 1697 | ||
| 7694 | 10년 전 | 1079 | ||
| 7693 | 10년 전 | 1566 | ||
| 7692 | 10년 전 | 1310 | ||
| 7691 | 10년 전 | 836 | ||
| 7690 | 10년 전 | 1398 | ||
| 7689 | 10년 전 | 1026 | ||
| 7688 | 10년 전 | 630 | ||
| 7687 |
파랑새1597
|
10년 전 | 607 | |
| 7686 | 10년 전 | 863 | ||
| 7685 | 10년 전 | 1351 | ||
| 7684 | 10년 전 | 809 | ||
| 7683 | 10년 전 | 1117 | ||
| 7682 | 10년 전 | 1036 | ||
| 7681 | 10년 전 | 681 | ||
| 7680 | 10년 전 | 997 | ||
| 7679 | 10년 전 | 520 | ||
| 7678 | 10년 전 | 749 | ||
| 7677 | 10년 전 | 649 | ||
| 7676 |
|
10년 전 | 956 | |
| 7675 |
|
10년 전 | 1185 | |
| 7674 | 10년 전 | 1056 | ||
| 7673 | 10년 전 | 762 | ||
| 7672 | 10년 전 | 1103 | ||
| 7671 | 10년 전 | 912 | ||
| 7670 | 10년 전 | 678 | ||
| 7669 |
mashmellow
|
10년 전 | 1240 | |
| 7668 | 10년 전 | 726 | ||
| 7667 | 10년 전 | 1024 | ||
| 7666 |
senseme
|
10년 전 | 667 | |
| 7665 | 10년 전 | 522 | ||
| 7664 | 10년 전 | 1907 | ||
| 7663 |
mixx애교
|
10년 전 | 987 | |
| 7662 | 10년 전 | 1055 | ||
| 7661 |
hkhkah
|
10년 전 | 801 | |
| 7660 | 10년 전 | 1076 | ||
| 7659 |
커네드커네드
|
10년 전 | 943 | |
| 7658 |
바람돌이팡
|
10년 전 | 686 | |
| 7657 | 10년 전 | 1175 | ||
| 7656 | 10년 전 | 1587 | ||
| 7655 | 10년 전 | 1005 | ||
| 7654 |
개발짜증나
|
10년 전 | 867 | |
| 7653 |
네이비칼라
|
10년 전 | 888 | |
| 7652 |
밥먹고합시다
|
10년 전 | 817 | |
| 7651 |
플라이SINJI
|
10년 전 | 1519 | |
| 7650 |
개발짜증나
|
10년 전 | 1429 | |
| 7649 | 10년 전 | 458 | ||
| 7648 |
이미영ㅇㅇ
|
10년 전 | 876 | |
| 7647 | 10년 전 | 452 | ||
| 7646 | 10년 전 | 822 | ||
| 7645 | 10년 전 | 2332 | ||
| 7644 | 10년 전 | 827 | ||
| 7643 |
|
10년 전 | 2878 | |
| 7642 | 10년 전 | 1521 | ||
| 7641 | 10년 전 | 1149 | ||
| 7640 |
개발짜증나
|
10년 전 | 479 | |
| 7639 |
|
10년 전 | 822 | |
| 7638 |
개발짜증나
|
10년 전 | 1143 | |
| 7637 | 10년 전 | 1561 | ||
| 7636 | 10년 전 | 2921 | ||
| 7635 | 10년 전 | 1710 | ||
| 7634 | 10년 전 | 1897 | ||
| 7633 | 10년 전 | 2357 | ||
| 7632 | 10년 전 | 3961 | ||
| 7631 |
|
10년 전 | 1551 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기