Tag

file-handling

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jan 14, 2025 · Backend Development

Reading Large Files in PHP Using fread: Line‑by‑Line Processing

This article explains how to efficiently read large files in PHP line by line with the fread function, provides a complete code example, and discusses additional techniques such as buffering, fseek positioning, and adjusting memory limits to avoid memory overflow.

Large FilesMemory ManagementPHP
0 likes · 4 min read
Reading Large Files in PHP Using fread: Line‑by‑Line Processing
php中文网 Courses
php中文网 Courses
Jan 10, 2024 · Backend Development

Using PHP fgetc() to Read Characters from Files and Standard Input

This article explains PHP's fgetc() function for reading a single character from an opened file or standard input, demonstrates how to open files with fopen(), shows example code for character-by-character reading using a while loop, and provides a user input handling example with a switch statement.

fgetcfile-handlingfopen
0 likes · 4 min read
Using PHP fgetc() to Read Characters from Files and Standard Input
php中文网 Courses
php中文网 Courses
Dec 18, 2023 · Backend Development

Using PHP's fwrite() Function to Write Data to Files

This article explains PHP's fwrite() function, its syntax and parameters, and provides clear code examples for writing strings and serialized arrays to files, while highlighting important considerations such as file opening modes and data types.

backendfile-handlingfwrite
0 likes · 4 min read
Using PHP's fwrite() Function to Write Data to Files
php中文网 Courses
php中文网 Courses
Oct 13, 2023 · Backend Development

Using PHP flock() for File Locking: Concepts, Modes, and Example Code

This article explains PHP's flock() function for file locking, covering the purpose of file locks, basic usage syntax, lock modes (shared, exclusive, unlock), a complete example script, and important considerations to safely handle concurrent file access in backend applications.

Concurrencybackendfile-handling
0 likes · 4 min read
Using PHP flock() for File Locking: Concepts, Modes, and Example Code
php中文网 Courses
php中文网 Courses
Sep 23, 2023 · Backend Development

How to Properly Use PHP fclose() to Close Files

This article explains the PHP fclose() function, demonstrates how to close a single file, handle errors, close multiple files in a loop, and provides important usage notes with clear code examples for reliable file management.

Tutorialerror-handlingfclose
0 likes · 4 min read
How to Properly Use PHP fclose() to Close Files
Laravel Tech Community
Laravel Tech Community
Apr 21, 2021 · Backend Development

zip_read() – Read the Next Entry in a ZIP Archive

The article explains PHP’s zip_read() function, detailing its purpose of reading the next entry in an opened ZIP archive, describing the required $zip resource parameter, and outlining the possible return values including the entry resource, FALSE when no more entries exist, or error codes.

PHParchivebackend
0 likes · 2 min read
zip_read() – Read the Next Entry in a ZIP Archive
Laravel Tech Community
Laravel Tech Community
Mar 31, 2021 · Backend Development

zip_entry_close() – Close a ZIP Archive Entry in PHP

The article explains the PHP function zip_entry_close(), which closes a directory entry obtained from a ZIP archive, details its syntax, parameters, return values, and provides a complete example demonstrating its usage within a typical zip handling workflow.

PHParchivebackend
0 likes · 2 min read
zip_entry_close() – Close a ZIP Archive Entry in PHP
Laravel Tech Community
Laravel Tech Community
Mar 25, 2021 · Backend Development

zip_read() – Read the Next Entry in a ZIP Archive (PHP)

The article explains PHP’s zip_read() function, detailing its purpose, required zip resource parameter, return values (including FALSE when no more entries), and provides a concise example showing how to open a ZIP file, read an entry, and close the archive.

archivebackendfile-handling
0 likes · 2 min read
zip_read() – Read the Next Entry in a ZIP Archive (PHP)