PHP file system related functions

伊谢尔伦
Release: 2016-11-22 09:20:00
Original
908 people have browsed it

Directory function

chdir — change the directory

chroot — change the root directory

closedir — close the directory handle

dir — Return an instance of the Directory class

getcwd — get the current working directory

opendir — open the directory handle

readdir — Read entries from a directory handle

rewinddir — Rewind a directory handle

scandir — List files and directories in a specified path

FileSystem function

basename — Return the filename portion of a path

chgrp — Change the group to which the file belongs

chmod — Change the file mode

chown — Change the owner of the file

clearstatcache — Clear the file status cache

copy — Copy the file

delete — See unlink or unset

dirname — Return to the path The directory part

disk_free_space — Returns the free space in the directory

disk_total_space — Returns the total disk size of a directory

diskfreespace — Alias ​​for disk_free_space

fclose — Closes an open file pointer

feof — Tests whether the file pointer is End of file reached

fflush — Output buffered content to file

fgetc — Read characters from file pointer

fgetcsv — Read a line from file pointer and parse CSV fields

fgets — Read from file pointer Get a line

fgetss — Read a line from the file pointer and filter out HTML tags

file_exists — Check if a file or directory exists

file_get_contents — Read the entire file into a string

file_put_contents — Write a string File

file — Read the entire file into an array

fileatime — Get the last access time of the file

filectime — Get the inode modification time of the file

filegroup — Get the group of the file

fileinode — Get the inode of the file

filemtime — Get the file modification time

fileowner — Get the owner of the file

fileperms — Get the permissions of the file

filesize — Get the file size

filetype — Get the file type

flock — Easy consultation file locking

fnmatch — Match filenames with patterns

fopen — Open a file or URL

fpassthru — Output all remaining data at the file pointer

fputcsv — Format lines to CSV and write to the file pointer

fputs — Alias ​​for fwrite

fread — Read a file (safe for binary files)

fscanf — Format input from a file

fseek — Locate in a file pointer

fstat — Get file information through an open file pointer

ftell — Return the position of the file pointer read/write

ftruncate — truncate the file to the given length

fwrite — write to the file (safe for binary files)

glob — find the file path matching the pattern

is_dir — Determine whether the given file name is a directory

is_executable — Determine whether the given file name is executable

is_file — Determine whether the given file name is a normal file

is_link — Determine whether the given file name is a symbolic link

is_readable — Determines whether the given file name is readable

is_uploaded_file — Determines whether the file was uploaded via HTTP POST

is_writable — Determines whether the given file name is writable

is_writeable — Alias ​​of is_writable

lchgrp — Changes group ownership of symlink

lchown — Changes user ownership of symlink

link — Create a hard link

linkinfo — Get information about a connection

lstat — Give information about a file or symbolic link

mkdir — Create a new directory

move_uploaded_file — Move the uploaded file to a new location

parse_ini_file — Parse a configuration file

parse_ini_string — Parse a configuration string

pathinfo — Return file path information

pclose — Close the process file pointer

popen — Open the process File pointer

readfile — Output a file

readlink — Return the target pointed to by the symbolic link

realpath_cache_get — Get realpath cache entries

realpath_cache_size — Get realpath cache size

realpath — Return the normalized absolute path name

rename — Rename Name a file or directory

rewind — rewind the position of the file pointer

rmdir — delete the directory

set_file_buffer — alias of stream_set_write_buffer

stat — give file information

symlink — establish a symbolic link

tempnam — Create a file with a unique file name

tmpfile — Create a temporary file

touch — Set the file access and modification time

umask — Change the current umask

unlink — Delete a file


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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!