mirror of
https://github.com/php/doc-ru.git
synced 2025-08-11 02:43:11 +00:00
105 lines
2.7 KiB
XML
105 lines
2.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: 0c9c2dd669fe9395eaa73d487fbd160f9057429a Maintainer: shein Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<refentry xml:id="function.fgetc" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>fgetc</refname>
|
||
<refpurpose>Считывает символ из файла</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis>
|
||
<type class="union"><type>string</type><type>false</type></type><methodname>fgetc</methodname>
|
||
<methodparam><type>resource</type><parameter>stream</parameter></methodparam>
|
||
</methodsynopsis>
|
||
<para>
|
||
Считывает символ из переданного указателя на файл.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>stream</parameter></term>
|
||
<listitem>
|
||
&fs.validfp.all;
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Возвращает строку с одним символом, прочтённым из файла, на который
|
||
указывает <parameter>stream</parameter>. Возвращает &false; при достижении EOF.
|
||
</para>
|
||
&return.falseproblem;
|
||
</refsect1>
|
||
|
||
<refsect1 role="examples">
|
||
&reftitle.examples;
|
||
<para>
|
||
<example>
|
||
<title>Пример использования функции <function>fgetc</function></title>
|
||
<programlisting role="php">
|
||
<![CDATA[
|
||
<?php
|
||
$fp = fopen('somefile.txt', 'r');
|
||
if (!$fp) {
|
||
echo 'Ошибка при открытии файла somefile.txt';
|
||
}
|
||
while (false !== ($char = fgetc($fp))) {
|
||
echo "$char\n";
|
||
}
|
||
?>
|
||
]]>
|
||
</programlisting>
|
||
</example>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="notes">
|
||
&reftitle.notes;
|
||
¬e.bin-safe;
|
||
</refsect1>
|
||
|
||
<refsect1 role="seealso">
|
||
&reftitle.seealso;
|
||
<para>
|
||
<simplelist>
|
||
<member><function>fread</function></member>
|
||
<member><function>fopen</function></member>
|
||
<member><function>popen</function></member>
|
||
<member><function>fsockopen</function></member>
|
||
<member><function>fgets</function></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
|
||
-->
|