<?php
/*
Building a cache
You can save data for a long time with a file
The file is a liunux model.
You can only get file under Windows, dir unknow
Block char dir file link unknown can be obtained under Linux
Blocks: Block set file partition, floppy disk drive, CD-ROM, etc.
Char: Character device I/O in characters, keyboard, printer
Dir: The directory is also a file
Fifo:
FileType ("file name"); Generally, save file types
Is_array ()
Is_file ()
Is_dir--Determine if a given file name is a directory
Is_executable--Determine if the given file name is executable
Is_file--Determine if the given file name is a normal file
Is_link--Determine if the given file name is a symbolic connection
Is_readable--to determine if a given file name is readable
Is_uploaded_file--Determine if the file was uploaded via HTTP POST
Is_writable--Determines whether a given file name can be written
Is_writeable--alias of Is_writable ()
Fileatime--Get the last access time of the file
Filectime--Get the Inode modification time of the file
Filegroup--The group that gets the file
Fileinode--Get the inode for the file
Filemtime--Get File modification time
Fileowner--Get the owner of the file
Fileperms--Permission to get files
FileSize--Get file size
FileType--Get file type
*/
/* echo filetype (".. /work_php ");
if (filetype ("./zhengze.php") = = "File")
echo "This is a file"; */
function Getfiletype ($filename) {
if (file_exists ($filename))
{
echo "file or directory {$filename} exists". " <br> ";
}
if (Is_dir ($filename)) {
echo "This is a directory!" "." <br> ";
}
if (is_readable ($filename)) {
echo "This is a readable file!". <br> ";
}
if (is_writeable ($filename)) {
echo "This is a file that can be written!". <br> ";
}
if (is_executable ($filename)) {
echo "This is a file that can be executed";
}
}
Getfiletype ("./zhengze.php");
?>
File Operation-php