|
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
PHP에서 다음과 같은 경고가 나왔다.
Warning</b>: DOMElement::__construct()
[<a href='function.DOMElement---construct'>function.DOMElement---construct</a>]
: unterminated entity reference D in <b>
원인
DOMElement 에 포함될 Attributes에 포함될수 없는 문자들이 포함된 경우다.
이런 경우에는 특수문자를 처리할 수 있는 htmlSpecialChars() 함수를 이용해서
해당 값을 래핑해줘야한다.
결과
$key2에 특수문자등이 포함된경우.
$doc->appendChild(new DOMElement($key1, htmlSpecialChars($key2)))
----------------------------------------------------------------------
1. Mac에서 Apache 설치하기
cd httpd-2.2.0
sudo ./configure \
--prefix=/apache2 \
--enable-module=most \
--enable-shared=max --enable-ssl --enable-rewrite \
--enable-so
sudo make
sudo make install
2. Mac에서 PHP 설치하기
% gnutar -xzf php-5.1.2.tar.gz
% cd php-5.1.2
% sudo mkdir /apache2/php
% ./configure \
% --prefix=/apache2/php \
% --with-zlib \
% --with-xml \
% --with-gd \ (optional, requires jpeg + png)
% --with-jpeg-dir=/usr/local \ (optional)
% --with-png-dir=/usr/local \ (optional)
% --with-mysql=/usr/local/mysql \ (optional)
% --with-apxs2=/apache2/bin/apxs
% sudo make
% sudo make install
% sudo cp php.ini-dist /apache2/php/lib/php.ini
blesscdh's Blog is powered by Daum & Tattertools