syntex error 질문입니다.(초초보)
아래 소스를 실행해보니 다음과 같은 에러가 나는데 어디가 잘못되었는지 모르겠어요.
도와주세요. 소스는 "성공적인 웹 프로그래밍 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>
이렇게 해주시면 되겠네요
게시글 목록
| 번호 | 제목 |
|---|---|
| 11797 | |
| 11796 |
기타
Progress 로딩바
|
| 29161 |
HTML
체크박스 전체선택 소스
|
| 11795 | |
| 11794 | |
| 11793 | |
| 11789 | |
| 11784 | |
| 29160 | |
| 11781 |
Flash
도와주세요..
2
|
| 11778 |
PHP
SSL 관련 링크
2
|
| 24966 | |
| 24964 | |
| 24963 |
제안서
회사약식제안서_기타
|
| 24961 | |
| 24960 | |
| 24950 |
제안서
홈페이지개발제안서_개발
9
|
| 24948 | |
| 24947 | |
| 24946 | |
| 24945 | |
| 24944 |
계약서
표준임대차계약서_부동산
|
| 24943 | |
| 24942 | |
| 24941 | |
| 24940 | |
| 24939 | |
| 29158 | |
| 11777 |
MySQL
Logrotate
|
| 11774 |
JavaScript
startssl 자동실행
2
|
| 11772 | |
| 11771 | |
| 11770 |
MySQL
mysql error code
|
| 11769 |
MySQL
Mysql - ErrCode
|
| 11765 | |
| 11764 |
기타
날짜 맞추기
|
| 11763 | |
| 11758 | |
| 29148 |
HTML
괜찮은 레이어 팝업창 소스
9
|
| 11752 | |
| 11747 | |
| 11746 | |
| 29147 | |
| 11744 |
JavaScript
플래쉬 초보입니다...질문좀 ^^
1
|
| 11735 |
Flash
퀵메뉴 - 수정해서 쓰세요!^^
8
|
| 29145 | |
| 11733 |
기타
히든필드 처리하기
1
|
| 11731 |
JavaScript
경고창의 폰트 조절.....
1
|
| 11730 | |
| 24937 | |
| 11728 | |
| 11727 | |
| 11725 | |
| 11717 | |
| 29138 | |
| 11716 | |
| 11715 |
JavaScript
특정 프로세스가 연 파일 보기.
|
| 11714 | |
| 11711 |
기타
CS3 간단 리뷰
2
|
| 11710 |
Flash
플래시 파일명 대신 외부파일 호출
|
| 11708 |
Flash
플래시 파일명 대신 외부파일 호출
1
|
| 11700 |
MySQL
mysql 원격접속방법
7
|
| 11697 | |
| 24936 | |
| 24935 | |
| 24934 | |
| 24933 | |
| 24932 | |
| 24931 | |
| 24930 | |
| 24929 | |
| 24928 | |
| 24927 | |
| 24926 |
계약서
주식양수도계약서_경리
|
| 24925 | |
| 24922 |
제안서
제안서_기업일반
2
|
| 24921 |
계약서
전세계약서_일반계약
|
| 24920 |
계약서
전세계약서_부동산
|
| 24919 | |
| 24918 | |
| 24917 | |
| 24916 | |
| 24915 |
계약서
장비임대 계약서_영업
|
| 24914 | |
| 24913 | |
| 11696 |
기타
메뉴를 찾습니다
|
| 11694 | |
| 24912 | |
| 24911 | |
| 24910 | |
| 24909 | |
| 24908 | |
| 24907 | |
| 24906 | |
| 11692 | |
| 24905 | |
| 24904 | |
| 24903 | |
| 24902 |
계약서
연봉제근로계약서
|
| 24901 |
계약서
연봉계약서-근로_기타
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기