정보기술/웹&데이터베이스
PHP 짧은 시작 태그 (short_open_tag) 설정
fermi
2010. 6. 5. 23:09
PHP 소스 파일의 시작 태그를 "<?"php 대신 "<?" 로 시작해도 되도록 설정하는 방법
php.ini 의 설정 항목 중 "short_open_tag" 설정
short_open_tag=On
short_open_tag=Off
http://sg.php.net/manual/en/ini.core.php#ini.open-basedir
PHP 의 시작 태그 옵션을 지정하는 것으로, php.ini 설정 항목 중 "short_open_tag" 항목의 값이:
- On 으로 설정된 경우, <? 와 같은 PHP 시작 태그를 사용할 수 있습니다.
- Off 로 설정된 경우, <? 와 같은 PHP 시작 태그는 사용할 수 없으며, <?php 와 같이 표기해야 합니다.
php.ini 의 설정 항목 중 "short_open_tag" 설정
short_open_tag=On
short_open_tag=Off
http://sg.php.net/manual/en/ini.core.php#ini.open-basedir
Tells PHP whether the short form (
<?
?>
)
of PHP's open tag should be allowed. If you want to use PHP in
combination with XML, you can disable this option in order to
use <?xml ?>
inline. Otherwise, you
can print it with PHP, for example: <?php
echo '<?xml
version="1.0"?>'; ?>
. Also, if disabled,
you must use the
long form of the PHP open tag (<?php
?>
).
짧은 시작 태그
PHP 의 시작 태그 옵션을 지정하는 것으로, php.ini 설정 항목 중 "short_open_tag" 항목의 값이:
- On 으로 설정된 경우, <? 와 같은 PHP 시작 태그를 사용할 수 있습니다.
- Off 로 설정된 경우, <? 와 같은 PHP 시작 태그는 사용할 수 없으며, <?php 와 같이 표기해야 합니다.