Tagged articles
File Reading
15 articles · Page 1 of 1
This article analyzes how to import one billion 1 KB log records stored in HDFS or S3 into MySQL, detailing why a single table cannot hold that volume, the B‑tree index limits, batch‑write strategies, storage‑engine choices, sharding, file‑reading methods, task coordination, and reliability mechanisms.
File ReadingMySQLRedis
0 likes · 18 min read

This guide explains how to use PHP's file_get_contents function to read local files and remote URLs, covering code examples, permission requirements, and best practices for handling errors and improving development efficiency.
File Readingfile_get_contents
0 likes · 3 min read

This guide explains how PHP’s file() function reads an entire file into an array, details its syntax and parameters, demonstrates basic and flag‑enhanced usage with code examples, and highlights important behaviors such as automatic newline handling.
File ReadingPHParray
0 likes · 4 min read

This article explains the PHP fgetc() function, showing how to open files with fopen(), read characters sequentially from a file, and capture single-character user input, accompanied by complete code examples and detailed usage notes.
File ReadingTutorialUser Input
0 likes · 4 min read

This article explains how the PHP file_get_contents() function works, detailing its syntax, parameters, and examples for reading both local and remote files, while also highlighting its usefulness for further data processing.
BackendFile ReadingPHP
0 likes · 3 min read

This article explains PHP's file() function, detailing its syntax, parameters, and usage examples for reading a file into an array, including how to handle flags such as FILE_IGNORE_NEW_LINES to control line endings.
BackendFile ReadingPHP
0 likes · 4 min read

This article explains how to use PHP's file_get_contents function to read the contents of local files or remote URLs, covering basic usage, permission considerations, and error handling with clear code examples.
File ReadingPHPfile_get_contents
0 likes · 4 min read

This article outlines a comprehensive strategy for rapidly loading one billion 1 KB log records stored in HDFS or S3 into MySQL, covering data partitioning, B‑tree limits, batch inserts, storage‑engine selection, sharding, concurrent write control, efficient file reading, task coordination, fault‑tolerant progress tracking with Redis, and distributed locking with Redisson.
Data ShardingDistributed LockFile Reading
0 likes · 20 min read

This article explains the syntax and parameters of PHP's file_get_contents() function, provides example code for reading both local and remote files, and highlights important usage notes for efficiently retrieving file contents in backend development.
BackendFile Readingfile_get_contents
0 likes · 4 min read

PHP's fgets() function reads a line from an opened file or stream, optionally limiting the number of bytes, and can be used for text and binary files; the article explains its syntax, examples for line-by-line reading, length control, binary handling, and error checking.
File ReadingTutorialfgets
0 likes · 5 min read

This article explains how to use PHP's fread() function to read a specified number of bytes from a file, covering opening files with fopen(), reading data, pointer behavior, error handling, and closing the file with fclose(), accompanied by code examples.
File Readingfreadphp-functions
0 likes · 4 min read

The article explains PHP's file_get_contents() function, detailing its syntax, each parameter and the return value, and provides practical examples for reading local files, remote files, URLs, and using stream contexts for advanced file access.
File Readingfile_get_contentsphp-functions
0 likes · 5 min read

This article explains why Python's print() adds a newline by default, demonstrates how to modify the end parameter or use rstrip() to print multiple outputs on a single line, and provides clear code examples for customizing print behavior when processing files.
File Readingend-parameternewline
0 likes · 5 min read

This guide demonstrates four practical techniques—input redirection, cat with a pipe, passing the filename as a parameter, and using awk—to read a text file line by line in a Bash script, complete with code snippets and expected output.
File Readingawkbash
0 likes · 4 min read


21CTONov 20, 2017 · Backend Development
This article explains how to monitor PHP memory and CPU usage, demonstrates functions for measuring peak memory, shows line‑by‑line and generator‑based file reading techniques, and compares traditional copying with stream‑based piping to reduce memory consumption on large files.
File ReadingMemory usagePHP
0 likes · 8 min read
