아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 12452 |
JavaScript
마우스를 따라다니는 그림
|
| 40 | |
| 25015 | |
| 12447 | |
| 12446 |
JavaScript
SQLPLUS & PLSQL 기초
|
| 12445 |
JavaScript
PLSQL이란
|
| 29296 |
HTML
동적 INPUT 박스
|
| 12440 |
기타
메뉴
4
|
| 12438 |
Flash
창밖에 풍경
1
|
| 12437 |
JavaScript
우분투 root관리자 접속 방법 (펌)
|
| 29294 |
HTML
우키막기
1
|
| 35 | |
| 32 | |
| 12434 |
JavaScript
tar로 묶을때 특정 디렉토리나 파일 포함하지 않고 묶기
2
|
| 12433 |
Flash
도스상에서 플렉스 사용하기
|
| 12432 | |
| 29293 |
HTML
컨텐츠 팝업 출력 소스
|
| 29 | |
| 12431 | |
| 12428 | |
| 12421 |
jQuery
JQuery + wSlide 를 이용한 슬라이딩
6
|
| 29292 |
HTML
시계
|
| 12411 | |
| 12402 | |
| 27 | |
| 29290 |
HTML
금액입력시 한글로 변환하여 표시
1
|
| 12400 | |
| 24 | |
| 12397 |
PHP
이번 달 달력 출력
2
|
| 12396 |
JavaScript
동적 테이블 추가,삭제
|
| 21 | |
| 12391 | |
| 12390 | |
| 18 | |
| 16 | |
| 12377 |
Flash
쇼핑몰에서 많이 쓰는 자동 슬라이드
12
|
| 12373 | |
| 13 | |
| 9 | |
| 12372 | |
| 12371 | |
| 12363 | |
| 1 | |
| 13432 | |
| 12362 |
JavaScript
vista에서 한글 php 매뉴얼 chm파일이 안 보일떄
|
| 12360 | |
| 12355 | |
| 25014 | |
| 29287 | |
| 12352 | |
| 12349 | |
| 29279 |
HTML
기상청 날씨정보 XML
7
|
| 12344 |
기타
네이버로그인
4
|
| 12340 | |
| 12335 | |
| 12333 | |
| 12331 | |
| 29273 |
HTML
자신의 홈피에 날씨를 달아보자.
5
|
| 12330 | |
| 12329 | |
| 12328 | |
| 12324 |
JavaScript
홈피 사진 올리는법 사진줄이 는법
3
|
| 12323 |
MySQL
MySQL 자동으로 dump 받기
|
| 12318 |
MySQL
쿼리문 해석좀 부탁드립니다
4
|
| 12316 | |
| 12313 |
JavaScript
이미지에 박스 넣기
2
|
| 12310 |
Flash
[펌] RED5 파헤치기
2
|
| 12309 |
JavaScript
php 파일을 html 확장자로 사용하기
|
| 12307 |
JavaScript
아파치 보안 팁 [외부에서 아파치정보 못 보게하기]
1
|
| 12303 | |
| 12296 |
JavaScript
SSH 공격막아내기 방법 1
6
|
| 12291 | |
| 12280 |
Flash
플래시 배너 소스
10
|
| 12277 | |
| 12275 |
MySQL
[펌] 사용자 계정 트래픽 제한 하기
1
|
| 29272 |
HTML
JavaScript MD5 사용하기~
|
| 12274 |
기타
휠로 이미지 크기 제어
|
| 12260 | |
| 12252 | |
| 12250 | |
| 12248 | |
| 29267 | |
| 12245 | |
| 29266 | |
| 29261 |
HTML
그림안에 투명텍스트박스 넣기...
4
|
| 12239 |
Flash
플래시점선없애주는 자바스크립트
5
|
| 12238 |
Flash
[질문] 플래시 테두리 제거 질문이요..ㅠㅠ
|
| 29251 |
HTML
숫자 100이하 절사
9
|
| 12236 | |
| 12231 | |
| 12228 | |
| 12214 | |
| 12211 | |
| 12210 | |
| 29248 | |
| 29247 | |
| 25010 | |
| 12208 |
JavaScript
file_put_contents() 함수
1
|
| 12207 |
MySQL
bash shell의 환경설정 의미와 그 예
|
| 12202 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기