fpassthru -输出所有剩余的数据文件指针
fpassthru
( PHP 4中, PHP 5中)
fpassthru -输出所有剩余的数据文件指针
描述
国际fpassthru (资源$处理)
读取EOF分析的特定文件指针从当前的位置和结果写入到输出缓冲区。
您可能需要请倒带( )重置文件指针的开头的文件如果您已经写入数据文件。
如果您只想转储文件内容的输出缓冲区,而不首先修改或寻求特定抵消,您可能会想要使用readfile ( ) ,从而节省您fopen ( )函数的调用。
参数
把柄
文件指针必须有效,必须指向一个文件成功打开fopen ( )或者fsockopen ( ) (和尚未关闭fclose ( ) ) 。
返回值
如果出现错误, fpassthru ( )返回FALSE 。否则, fpassthru ( )返回的字符数读取处理和通过输出。
实例
例如# 1使用fpassthru ( )与二进制文件
// open the file in a binary mode
$name = './img/ok.png';
$fp = fopen($name, 'rb');
// send the right headers
header("Content-Type: image/png");
header("Content-Length: " . filesize($name));
// dump the picture and stop the script
fpassthru($fp);
exit;
?>

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

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Zend Studio 13.0.1
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

WebStorm Mac version
Useful JavaScript development tools
