Mathematical functions1.abs (): Absolute value$abs = ABS (-4.2); 4.2 Numeric Absolute number2.ceil (): Into a method to take the wholeecho ceil (9.999); 10 floating point number in one rounding3.floor (): Rounding off the Rounding methodecho Floor (9
Accounting for 134 (experimental Class) Jangafopen open file or URLResource fopen (String $filename, String $mode) open failure returns falseThe mode parameter specifies the list of access types required to the stream:
Mode
Phpstr_replace: This section describes the system functions related to file operations in PHP. these functions are also very important, the following examples are still common examples.
Basename-part of the file name in the returned
Filemtime (stringfilename) returns the time when the file was last modified, and FALSE if an error occurs. Time is returned in Unix timestamp format and can be used for date (). Example: paiafilemtime("log.txt & quot;); echo & quot;
In PHP to get the file modification, the creation time we can directly use the Filemtime () function, which can return the file content last modified time.
If successful, the time is returned in the form of a Unix timestamp. If it fails, it returns
A Directory Operations
BaseName--Returns the file name portion of the path
DirName--Returns the directory portion of the path
PathInfo--Returns information about the file path
Realpath--Returns the normalized absolute path name
Copy CodeThe code is
Php obtains the file creation time, modification time. php obtains the file creation time, modification time. filemtime (stringfilename) returns the last modification time of the file, and FALSE if an error occurs. Time is returned in Unix timestamp
First, the PHP system file processing
/* PHP File System processing * All file processing is done using system functions. * is based on LINUX/UNIX system for Model * * File system processing function: * 1. All projects are inseparable from file
PHP Processing of files
PHP in the application of server-side files, the related category is not only the user and the server database between the various connection access operations, but also through the PHP built-in file processing functions, for
Various time for php to read files. In php, you can use the filemtime () function to obtain the file modification time. it can return the last modification time of the file content. If the modification succeeds, the Unix timestamp-based party needs
PHP Processing of files
PHP in the application of server-side files, the related category is not only the user and the server database between the various connection access operations, but also through the PHP built-in file processing functions, for
FileType ()
Get the type of file
Get the file types under Windows
echo filetype ("D:\\lamp\\php5\\php.ini"). "";
Output file representation is a normal document
echo filetype ("d:\\lamp\\php5"). "";
Output dir indicates
. Ini file
The INI file (also called the initialization file) is used to save the applicationProgramA special ASCII file for setting and options. It uses ". ini" as the file extension and is also called a configuration file or profile ). In
If successful, the time is returned in Unix timestamp format. If it fails, false is returned.Filemtime (string filename)Returns the time when the file was last modified. If an error occurs, FALSE is returned. Time is returned in Unix timestamp
PHP's file directory base operation
We know that the temporary declaration of the variable is stored in memory, even if it is a static variable, the script will be released after the run, so, want to persist the contents of a variable, one way is to
First, PHP system functions
Function
Function
Usage
Var_dump ()
Print variable structure information, including type and value. Array will recursively expand values
Var_dump ( $arg1...);
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service