1
0
mirror of https://github.com/php/doc-tr.git synced 2026-03-23 23:02:09 +01:00
Files
archived-doc-tr/reference/ftp/examples.xml
2021-09-25 17:19:51 +03:00

71 lines
1.7 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 4d1c34c9b7a30cfc3a59641122c707a2812cfed7 Maintainer: nilgun Status: ready -->
<chapter xml:id="ftp.examples" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.examples;
<section xml:id="ftp.examples-basic">
<title>Temel kullanım</title>
<para>
<example>
<title>- FTP örneği</title>
<programlisting role="php">
<![CDATA[
<?php
// Bağlantıyı kuralım
$bt = ftp_connect($ftp_sunucu);
// kullanıcı adı ve parola ile oturum açalım
$bağlantı = ftp_login($bt, $ftpci, $ftpci_parolası);
// bağlantıyı sınayalım
if ((!$bt) || (!$bağlantı)) {
echo "FTP bağlantısı kurulamadı!";
echo "$ftpci için $ftp_sunucu sunucusuna bağlanmaya çalışılıyordu.";
exit;
} else {
echo "$ftpci için $ftp_sunucu sunucusuna bağlantı kuruldu.";
}
// Dosyayı sunucuya yükleyelim
$yükleme = ftp_put($bt, $hedef, $kaynak, FTP_BINARY);
// Duruma bakalım
if (!$yükleme) {
echo "FTP dosya yüklemesi başarısız oldu!";
} else {
echo "$kaynak dosyası $ftp_sunucu sunucusuna ";
echo "$hedef dosyası olarak yüklendi.";
}
// FTP bağlantısını kapatalım
ftp_close($bt);
?>
]]>
</programlisting>
</example>
</para>
</section>
</chapter>
<!-- 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=xml
vi: ts=1 sw=1
-->