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

pimchanok leuwisetpaiboon [PHP] Utility function 9

WBOY
Release: 2016-07-29 08:37:14
Original
916 people have browsed it

//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.

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template