PHP5 - 해당되는 글 2건

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)))
----------------------------------------------------------------------

      개발관련  |  2009. 5. 19. 18:02




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

      카테고리 없음  |  2008. 5. 23. 17:57



blesscdh's Blog is powered by Daum & Tattertools