PHPSPL standard library file operations (SplFileInfo and SplFileObject) instance ,. For file operations (SplFileInfo and SplFileObject) instances in the PHPSPL standard library, PHPSPL provides the SplFileInfo and SplFileObject classes to process
This article describes the file operations (SplFileInfo and SplFileObject) instances in the PHPSPL standard library. This article describes how SplFileInfo is used to obtain file details, SplFileObject traversal, searching for specified rows, and
PHP programming File Processing class SplFileObject and SplFileInfo usage instance analysis,
This article describes the usage of SplFileObject and SplFileInfo for PHP programming file processing. We will share this with you for your reference. The
This article describes the file operations (SplFileInfo and SplFileObject) instances in the PHPSPL standard library. This article describes how SplFileInfo is used to obtain file details, SplFileObject traversal, searching for specified rows, and
File Processing classes:Splfileinfo {/* Method */public __construct (String $file _name) public int getatime (void)//Get last access time for file public string g Etbasename ([string $suffix])//Gets the base name of the file without path information,
PHP SPL provides two classes of splfileinfo and Splfileobject to handle file operations.
Splfileinfo used to get file details:
Copy CodeThe code is as follows:$file = new Splfileinfo (' Foo-bar.txt '); Print_r (Array (' Getatime ' = $file->getatime
PHP SPL provides splfileinfo and splfileobject two classes to handle file operations.
Splfileinfo used to get file details:
Copy Code code as follows:
$file = new Splfileinfo (' Foo-bar.txt ');
Print_r Array (
' Getatime ' => $file-
File operations in the PHPSPL standard library. PHPSPL standard library file operations this article mainly introduces PHPSPL standard library file operations (SplFileInfo and SplFileObject) instances, this article explains SplFileInfo for getting
Introduction to PHP Standard Library (SPL) notes
SPL is the abbreviation of Standard PHP Library (PHP Standard Library.
The Standard PHP Library (SPL) is a collection of interfaces and classes that are meant to solve common problems.
According to
Introduction to PHP SplFileObject reading large files. If the size of the file to be loaded is very large, such as several hundred MB or GB, the performance will be reduced. Is there any processing function or class for large files in PHP? The
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.