mirror of
https://github.com/php/doc-tr.git
synced 2026-03-24 07:12:18 +01:00
135 lines
3.7 KiB
XML
135 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- $Revision$ -->
|
||
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: nilgun Status: ready -->
|
||
<!-- splitted from ./en/functions/exec.xml, last change in rev 1.24 -->
|
||
<refentry xml:id="function.system" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>system</refname>
|
||
<refpurpose>Belirtilen harici komutu çalıştırır ve çıktısını gösterir
|
||
</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type class="union"><type>string</type><type>false</type></type><methodname>system</methodname>
|
||
<methodparam><type>string</type><parameter>komut</parameter></methodparam>
|
||
<methodparam choice="opt"><type>int</type><parameter role="reference">sonuç</parameter><initializer>&null;</initializer></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
<function>system</function> işlevi C dilindeki adaşı gibi verilen
|
||
<parameter>komut</parameter>'u çalıştırır ve sonucunu çıktılar.
|
||
</para>
|
||
<para>
|
||
PHP bir sunucu modülü olarak çalışırken, bu işlev her çıktı satırından
|
||
sonra HTTP sunucusunun çıktı tamponunu boşaltmaya çalışır.
|
||
</para>
|
||
<para>
|
||
Bir komutu, çıktısı ortamla etkileşime girmeden çalıştırmak isterseniz
|
||
<function>passthru</function> işlevini kullanın.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>komut</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Çalıştırılacak komut.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><parameter>sonuç</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Bu bağımsız değişken belirtilmişse çalıştırılan komutun çıktısı bu değişkene
|
||
yazılır.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Başarısızlık durumunda &false; aksi takdirde komut çıktısının son satırı
|
||
döner.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>- <function>system</function> örneği</title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
echo '<pre>';
|
||
|
||
// "ls" kabuk komutunun sonucunu çıktılar ve
|
||
// çıktının son satırını $son_satır ile döndürürken,
|
||
// işlevin dönüş değerini $sonuç değişkenine kaydeder.
|
||
$son_satır = system('ls', $sonuç);
|
||
|
||
// Bilgileri basalım
|
||
echo '
|
||
</pre>
|
||
<hr />Çıktının son satırı: ' . $son_satır . '
|
||
<hr />Dönüş değeri: ' . $sonuç;
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="notes">
|
||
&reftitle.notes;
|
||
&warn.escapeshell;
|
||
¬e.exec-bg;
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><function>exec</function></member>
|
||
<member><function>passthru</function></member>
|
||
<member><function>popen</function></member>
|
||
<member><function>escapeshellcmd</function></member>
|
||
<member><function>pcntl_exec</function></member>
|
||
<member><link linkend="language.operators.execution">Çalıştırma
|
||
İşleci</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
|
||
-->
|