php-doc-en/reference/info/functions/php-sapi-name.xml

62 lines
1.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 1.5 Maintainer: progcom Status: ready -->
<!-- CREDITS: myprogram -->
<refentry id="function.php-sapi-name">
<refnamediv>
<refname>php_sapi_name</refname>
<refpurpose>
웹 서버와 PHP 간의 접근 형태를 반환합니다.
</refpurpose>
</refnamediv>
<refsect1>
<title>설명</title>
<methodsynopsis>
<type>string</type><methodname>php_sapi_name</methodname>
<void/>
</methodsynopsis>
<simpara>
<function>php_sapi_name</function>은 웹 서버와 PHP(서버 API, SAPI) 사이의
접근 형태를 설명하는 소문자 문자열을 반환합니다. CGI PHP에서, 문자열은
"cgi"이고, 아파치의 mod_php에서, 문자열은 "apache"인 형태입니다.
</simpara>
<para>
<example>
<title><function>php_sapi_name</function> 예제</title>
<programlisting role="php">
<![CDATA[
<?php
$sapi_type = php_sapi_name();
if ($sapi_type == "cgi") {
echo "You are using CGI PHP\n";
} else {
echo "You are not using CGI PHP\n";
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->