Home Backend Development PHP Tutorial pimchanok leuwisetpaiboon [PHP] Utility function 9

pimchanok leuwisetpaiboon [PHP] Utility function 9

Jul 29, 2016 am 08:37 AM

//Execute the external program or external instruction entered command. The returned string is just the last line returned after the external program is executed; if you need to return the information completely, you can use PassThru()
string exec(string command,string [array],int [return_var])
//To execute the command, and output the result. If the return_var parameter exists, the status after executing command will be filled in return_var
string system(string command,int [return_var]
//Execute as an external program and display the original output
string passthru(string command,int [return_var])
//Remove special symbols in the string
string escapeshellcmd(string command)
//Used to lock the file so that other processes cannot access it. The parameter fp passed in is the file pointer. The value of the parameter operation is the following number. One: 1 means setting the locked file to allow other processes to read; 2 means only the process can write to the file; 3 means locking both reading and writing; 4 means not locking the file block
bool flock(int fp,int operation)
//Extract all tag content attributes from the file and return an array
array get_meta_tags(string filename[,int use_include_path])
//Read the entire file into an array, each line as an array Array element
array file(void)
//Create a writable temporary file, which is automatically deleted when the fclose() function is called or when the script ends
array tmpfile(void)
//Open a file or URL and Return a file pointer
int fopen(string filename,string mode)
//Close an open file pointer
int fclose(int fp)
//Test a file pointer to see if it has reached the end of the file
int feof(int fp)
//Use the file pointer to obtain a line
string fgets(int fp,int length)
//Same function as fgets(), and at the same time remove the HTML language and PHP syntax mark characters in the retrieved string
string fgetss(int fp, int length)
//Get the character pointed to by the file pointer. If the pointer is in EOF, return false
string fgetc(int fp)
//Write the string string to the pointer fp of the file data stream, if specified. length length, a string of length will be written, or written to the end of the string
int fwrite(int fp,string string,int [lenth])
//Force to enter the write operation to the file pointed to by fp
int fflush (int fp)
//Move the position of the file pointer to the beginning of the file
int rewind(int fp)
//Return the pointer offset value of file fp. When an error occurs, return false
int ftell(int fp)
//Move the pointer of file fp to the specified offset (offset). When fp opens URL files such as http://... or ftp://... by fopen(), this function is invalid
int fseek(int fp,int offset)
//Read the file and The file content is written to the standard output device
int readfile(string filename)
//Read the file fp until EOF, and output the data to the standard output
int fpassthru(int fp)

The above has introduced pimchanok leuwisetpaiboon [PHP] utility function 9, including the content of pimchanok leuwisetpaiboon. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

11 Best PHP URL Shortener Scripts (Free and Premium) 11 Best PHP URL Shortener Scripts (Free and Premium) Mar 03, 2025 am 10:49 AM

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

Working with Flash Session Data in Laravel

Introduction to the Instagram API Introduction to the Instagram API Mar 02, 2025 am 09:32 AM

Introduction to the Instagram API

Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React Build a React App With a Laravel Back End: Part 2, React Mar 04, 2025 am 09:33 AM

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

12 Best PHP Chat Scripts on CodeCanyon

Notifications in Laravel Notifications in Laravel Mar 04, 2025 am 09:22 AM

Notifications in Laravel

See all articles