php fgetc 函数
php fgetc 函数
fgetc
( PHP 4中, PHP 5中)
fgetc -获取字符从文件指针
描述
字符串fgetc (资源$处理)
获取一个字符从给定文件指针。
参数
把柄
文件指针必须有效,必须指向一个文件成功打开fopen ( )或者fsockopen ( ) (和尚未关闭fclose ( ) ) 。
返回值
返回一个字符串包含一个单一的字符读取文件指出,由处理。返回FALSE的EOF分析。
警告
这个功能可能会返回布尔错误的,而且还可以返回一个非布尔值的计算为false ,如0或“ ” 。请仔细阅读部分布尔以获取更多信息。使用===操作符进行测试的返回值这一职能。
实例
例如# 1 fgetc ( )的例子
$fp = fopen('somefile.txt', 'r');
if (!$fp) {
echo 'Could not open file somefile.txt';
}
while (false !== ($char = fgetc($fp))) {
echo "$charn";
}
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver CS6
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool