mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-20 02:48:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@158757 c90b9560-bf6c-de11-be94-00142212c4b1
72 lines
1.8 KiB
XML
72 lines
1.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.10 $ -->
|
|
<!-- splitted from ./en/functions/filesystem.xml, last change in rev 1.2 -->
|
|
<refentry id="function.fgetc">
|
|
<refnamediv>
|
|
<refname>fgetc</refname>
|
|
<refpurpose>Gets character from file pointer</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>fgetc</methodname>
|
|
<methodparam><type>resource</type><parameter>handle</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Returns a string containing a single character read from the
|
|
file pointed to by <parameter>handle</parameter>.
|
|
Returns &false; on EOF.
|
|
</para>
|
|
|
|
&fs.validfp.all;
|
|
&return.falseproblem;
|
|
|
|
<para>
|
|
<example>
|
|
<title>A <function>fgetc</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$fp = fopen('somefile.txt', 'r');
|
|
if (!$fp) {
|
|
echo 'Could not open file somefile.txt';
|
|
}
|
|
while (false !== ($char = fgetc($fp))) {
|
|
echo "$char\n";
|
|
}
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
¬e.bin-safe;
|
|
|
|
<para>
|
|
See also <function>fread</function>, <function>fopen</function>,
|
|
<function>popen</function>, <function>fsockopen</function>, and
|
|
<function>fgets</function>.
|
|
</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
|
|
-->
|