php (file related operations)

Commonly used file operation functions are as follows:

Insert picture description here

The output above is as follows:

3 different functions output different results

Insert picture description here

You can see that file_put_contents will overwrite the write

Insert picture description here

The operation functions of the following files are basically consistent with the function usage of the files in the C language.

Insert picture description here

a means that the append mode is open + means it is also readable.

Insert picture description here

Some file operation related functions:

Insert picture description here

Insert picture description here

Some functions and usage of folder operations:

Insert picture description here

Function to delete folders recursively:

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_46456049/article/details/108589742
Recommended