[PHP] Utility function 9 // execute the external program or external command that inputs the command. The returned string is the last line returned after the external program is executed. to return the complete information, you can use PassThru ()
String exec (string command, string [array], int [return_var])
// Execute the command and output the result. If the return_var parameter exists, the status after command execution is filled in return_var.
String system (string command, int [return_var]
// Run as an external program and display the original output
String passthru (string command, int [return_var])
// Remove special characters from the string
String escapeshellcmd (string command)
// Used to lock files so that other processes cannot access them. The input parameter fp is the file pointer. The value of operation is one of the following: 1 indicates that the lock file can be read by other processes; 2 indicates that only the process can write files; 3 indicates that the read and write operations are locked; 4. do not lock the file block)
Bool flock (int fp, int operation)
// Extract all <meta> flag 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 row serves as an array element.
Array file (void)
// Create a writable temporary file. the file is automatically deleted when the fclose () function is called or the script ends.
Array tmpfile (void)
// Open a file or URL and return a file pointer
Int fopen (string filename, string mode)
// Close an opened file pointer
Int fclose (int fp)
// Test a file pointer to see if it is at the end of the file
Int feof (int fp)
// Obtain a row using the file pointer
String fgets (int fp, int length)
// Same as fgets (), and removes the HTML and PHP syntax mark characters in the retrieved string.
String fgetss (int fp, int length)
// Obtain the characters indicated by the file pointer. If the pointer is in EOF, false is returned.
String fgetc (int fp)
// Write the string to the fp pointer of the file data stream. If the length is specified, a string of the length is written or the end of the string is written.
Int fwrite (int fp, string, int [lenth])
// Force write operations on the file directed to fp
Int fflush (int fp)
// Move the file pointer to the beginning of the file
Int rewind (int fp)
// Return the pointer offset value of the file fp. If an error occurs, false is returned.
Int ftell (int fp)
// Move the file fp pointer to the specified offset. This function is invalid when fp opens URL files such as http: //... or ftp: //... by fopen ().
Int fseek (int fp, int offset)
// Read the file and write the file content to the standard output device.
Int readfile (string filename)
// Read the file fp until EOF, and output the data to the standard output
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