Tag

file handling

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jun 13, 2025 · Backend Development

Master PHP’s file() Function: Read Files into Arrays with Flags

Learn how to use PHP’s built‑in file() function to read a text file into an array, control newline handling with FILE_IGNORE_NEW_LINES, skip empty lines with FILE_SKIP_EMPTY_LINES, and see practical code examples illustrating each option.

BackendPHParray
0 likes · 4 min read
Master PHP’s file() Function: Read Files into Arrays with Flags
php中文网 Courses
php中文网 Courses
Jun 12, 2025 · Backend Development

Master PHP’s ftell(): How to Get File Pointer Position with Code Examples

This article explains how to use PHP's ftell() function to retrieve the current file pointer position, covering its signature, parameters, return values, and providing a practical code example that reads the first ten bytes of a file and displays the pointer offset.

PHPbackend developmentfile handling
0 likes · 4 min read
Master PHP’s ftell(): How to Get File Pointer Position with Code Examples
php中文网 Courses
php中文网 Courses
Jun 9, 2025 · Backend Development

Master PHP’s is_file(): Check Files and Paths Like a Pro

This article explains how the PHP is_file() function works, shows its syntax, and provides clear code examples for checking whether a given path exists and is a regular file, while also noting its limitations and the alternative is_dir() function.

PHPTutorialbackend development
0 likes · 3 min read
Master PHP’s is_file(): Check Files and Paths Like a Pro
Code Mala Tang
Code Mala Tang
Jun 4, 2025 · Fundamentals

10 Powerful CSV Module Tricks Every Python Developer Should Know

This guide reveals ten powerful and often overlooked techniques for Python’s built‑in csv module, covering automatic delimiter detection, header detection, custom dialects, DictWriter usage, selective column reading, generator‑based streaming, special‑character escaping, safe appending, CSV‑JSON conversion, and explicit Unicode handling to boost data‑processing efficiency.

CSVData ProcessingPython
0 likes · 8 min read
10 Powerful CSV Module Tricks Every Python Developer Should Know
php中文网 Courses
php中文网 Courses
Jun 4, 2025 · Backend Development

PHP rename() Function: Syntax, Parameters, Return Values, Examples, and Notes

This article explains PHP's rename() function, detailing its syntax, required source and target parameters, return values, and provides practical code examples for renaming both files and directories while highlighting important permission considerations.

BackendFilesystemPHP
0 likes · 4 min read
PHP rename() Function: Syntax, Parameters, Return Values, Examples, and Notes
php中文网 Courses
php中文网 Courses
May 26, 2025 · Backend Development

Using PHP file() Function to Read Files into an Array

This article explains how the PHP file() function reads a file’s contents into an array, describes its parameters, demonstrates basic usage and advanced options such as ignoring newline characters, and provides complete code examples for practical implementation.

Code ExamplePHParray
0 likes · 5 min read
Using PHP file() Function to Read Files into an Array
php中文网 Courses
php中文网 Courses
May 23, 2025 · Backend Development

Understanding PHP's is_file() Function: Usage, Parameters, and Examples

This article explains the PHP is_file() function, how it determines file existence, its parameters, common pitfalls, and provides clear code examples for practical use in backend development.

FunctionsPHPbackend development
0 likes · 4 min read
Understanding PHP's is_file() Function: Usage, Parameters, and Examples
Code Mala Tang
Code Mala Tang
May 21, 2025 · Backend Development

Master FastAPI Responses: JSON, HTML, Files, Streaming & Custom Classes

Learn how FastAPI handles various response types—including default JSON, custom status codes and headers, HTMLResponse, FileResponse, StreamingResponse, and user‑defined response classes—while covering best practices, common pitfalls, and code examples for building robust APIs.

API responsesBackendFastAPI
0 likes · 8 min read
Master FastAPI Responses: JSON, HTML, Files, Streaming & Custom Classes
php中文网 Courses
php中文网 Courses
May 12, 2025 · Backend Development

Using PHP tmpfile() to Create and Manage Temporary Files

This article explains how the PHP tmpfile() function creates a unique temporary file that is automatically removed when the script ends, demonstrates its syntax and usage with example code, and highlights important considerations such as resource handling and manual deletion with unlink().

PHPbackend developmentfile handling
0 likes · 4 min read
Using PHP tmpfile() to Create and Manage Temporary Files
Python Programming Learning Circle
Python Programming Learning Circle
May 9, 2025 · Fundamentals

10 Practical Python Scripts for Text File Automation

This article presents ten useful Python automation scripts that demonstrate how to read, compare, filter, merge, re‑encode, extract, count, report, replace, and selectively retrieve lines from text files, helping both developers and everyday users boost productivity.

PythonScriptingautomation
0 likes · 10 min read
10 Practical Python Scripts for Text File Automation
php中文网 Courses
php中文网 Courses
Apr 24, 2025 · Backend Development

Using PHP readfile() to Output File Contents to Browser or Another File

This article explains PHP's readfile() function, its syntax, return values, and demonstrates how to use it to output a file's contents to the browser or copy it to another file, including example code and handling of missing files.

BackendPHPTutorial
0 likes · 4 min read
Using PHP readfile() to Output File Contents to Browser or Another File
php中文网 Courses
php中文网 Courses
Apr 22, 2025 · Backend Development

Using PHP's file_get_contents to Read Local and Remote Files

This article explains how the PHP function file_get_contents can be used to read the contents of both local files and remote URLs, shows code examples, highlights permission requirements, and discusses error‑handling considerations for reliable file access.

BackendPHPWeb Development
0 likes · 3 min read
Using PHP's file_get_contents to Read Local and Remote Files
Python Programming Learning Circle
Python Programming Learning Circle
Apr 16, 2025 · Fundamentals

50 Practical Python Code Snippets for File Operations, Data Processing, Web Requests, Date/Time Handling, and Utilities

This article presents fifty ready‑to‑use Python examples covering file and directory manipulation, data processing, network requests, date‑time utilities, and assorted handy tools, each accompanied by clear explanations and complete code snippets to help developers quickly apply common programming tasks.

Code ExamplesData ProcessingDateTime
0 likes · 31 min read
50 Practical Python Code Snippets for File Operations, Data Processing, Web Requests, Date/Time Handling, and Utilities
php中文网 Courses
php中文网 Courses
Apr 9, 2025 · Fundamentals

Comprehensive Guide to File Operations in Python

This article provides a thorough introduction to Python file operations, covering opening modes, reading and writing techniques, context managers, advanced handling like binary files and CSV processing, best practices, and practical exercises to master file I/O.

File I/OProgrammingPython
0 likes · 8 min read
Comprehensive Guide to File Operations in Python
php中文网 Courses
php中文网 Courses
Apr 9, 2025 · Backend Development

Using PHP file() Function to Read Files into an Array

This article explains how to use PHP's file() function to read a file's contents into an array, describes its syntax and parameters, demonstrates basic and flag‑enhanced usage with code examples, and highlights important behaviors such as automatic newline removal.

PHParraybackend development
0 likes · 4 min read
Using PHP file() Function to Read Files into an Array
php中文网 Courses
php中文网 Courses
Apr 8, 2025 · Backend Development

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

This article explains how to use PHP's fgetc() function to read single characters from a file or standard input, covering file opening with fopen(), reading loops, handling end‑of‑file, and practical code examples for both file and user input scenarios.

PHPSTDINcharacter input
0 likes · 4 min read
Using PHP fgetc() to Read Characters from Files and Standard Input
Python Programming Learning Circle
Python Programming Learning Circle
Mar 26, 2025 · Fundamentals

50 Practical Python Code Examples Covering Files, Data Processing, Web Requests, Dates, and Utilities

This article presents 50 concise Python code snippets that demonstrate essential techniques for file and directory manipulation, data handling, web requests, date and time processing, and a variety of useful utilities, providing ready‑to‑use examples for developers of all levels.

Code ExamplesData ProcessingDateTime
0 likes · 18 min read
50 Practical Python Code Examples Covering Files, Data Processing, Web Requests, Dates, and Utilities
php中文网 Courses
php中文网 Courses
Mar 25, 2025 · Backend Development

Accurate MIME Type Detection in PHP with league/mime-type-detection

This article explains how to install and use the league/mime-type-detection library in PHP to reliably detect MIME types via file content, extensions, or both, offering code examples, lookup features, and a discussion of its advantages for backend file‑handling systems.

BackendComposerMIME type
0 likes · 4 min read
Accurate MIME Type Detection in PHP with league/mime-type-detection
php中文网 Courses
php中文网 Courses
Mar 21, 2025 · Backend Development

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

This article explains PHP's fgetc() function, showing how to open files with fopen(), read individual characters from files or standard input, and provides complete code examples illustrating character-by-character reading and handling user input using loops and switch statements.

PHPReading Charactersbackend development
0 likes · 4 min read
Using PHP fgetc() to Read Characters from Files and User Input
php中文网 Courses
php中文网 Courses
Mar 19, 2025 · Backend Development

Reading Files into an Array with PHP's file() Function

This article explains how to use PHP's file() function to read a file's contents into an array, covering its syntax, parameters, optional flags such as FILE_IGNORE_NEW_LINES, and provides clear code examples for practical use.

BackendPHParray
0 likes · 4 min read
Reading Files into an Array with PHP's file() Function