mirror of
https://github.com/php/doc-tr.git
synced 2026-03-24 15:22:23 +01:00
123 lines
3.3 KiB
XML
123 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: 8dd14a886c7e954cef181c374b6f05cc7149e643 Maintainer: nilgun Status: ready -->
|
||
<refentry xml:id="function.php-sapi-name" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>php_sapi_name</refname>
|
||
<refpurpose>HTTP sunucusu ile PHP arasındaki arayüzün türünü döndürür
|
||
</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type class="union"><type>string</type><type>false</type></type><methodname>php_sapi_name</methodname>
|
||
<void/>
|
||
</methodsynopsis>
|
||
<simpara>
|
||
PHP'nin kullandığı arayüz (Sunucu API'si, SAPI) türünü belirten küçük
|
||
harfli bir dizge döndürür. Örneğin CLI PHP için bu dizge "cli" olurken
|
||
Apache ile kullanılan API'ye bağlı olarak değişiklik gösteribilir. Olası
|
||
değerler aşağıda listelenmiştir.
|
||
</simpara>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
&no.function.parameters;
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Başarı durumunda küçük harfli bir dizge olarak arayüz
|
||
türü,&return.falseforfailure;.
|
||
</para>
|
||
<para>
|
||
Tamamı olmasa da olası değerler şunlardır:
|
||
<literal>apache</literal>,
|
||
<literal>apache2handler</literal>,
|
||
<literal>cgi</literal> (PHP 5.3'e kadar),
|
||
<literal>cgi-fcgi</literal>,
|
||
<literal>cli</literal>,
|
||
<literal>cli-server</literal>,
|
||
<literal>embed</literal>,
|
||
<literal>fpm-fcgi</literal>,
|
||
<literal>litespeed</literal>,
|
||
<literal>phpdbg</literal>.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<example>
|
||
<title>- <function>php_sapi_name</function> örneği</title>
|
||
<para>
|
||
Bu örnekte<literal>cgi-fcgi</literal> değerini de kapsayan
|
||
<literal>cgi</literal> alt dizgesinin varlığı aranmaktadır.
|
||
</para>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
$sapi_type = php_sapi_name();
|
||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||
echo "CGI PHP kullanıyorsunuz\n";
|
||
} else {
|
||
echo "CGI PHP kullanmıyorsunuz\n";
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</refsect1>
|
||
|
||
<refsect1 role="notes">
|
||
&reftitle.notes;
|
||
<note>
|
||
<title>Başka bir yaklaşım</title>
|
||
<para>
|
||
PHP sabiti <constant>PHP_SAPI</constant>,
|
||
<function>php_sapi_name</function> işlevinden dönen değerin aynını içerir.
|
||
</para>
|
||
</note>
|
||
<tip>
|
||
<title>Olası bir yanlış anlama</title>
|
||
<para>
|
||
Tanımlı <acronym>SAPI</acronym> her zaman apaçık belli değildir. Apache
|
||
örneğindeki gibi <literal>apache2handler</literal> olarak tanımlanmış
|
||
olabilir.
|
||
</para>
|
||
</tip>
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><link linkend="reserved.constants.core">PHP_SAPI</link></member>
|
||
</simplelist>
|
||
</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:"~/.phpdoc/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
|
||
-->
|