How does php determine whether a picture exists?
This article will explain in detail how to judge the existence of a picture by php. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
In php, you can use the file_exists () function to determine whether a picture exists, this function can detect the existence of a file or directory, syntax format "file_exists (picture file path)"; if the picture file exists, return true, otherwise return false.
Operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
In php, you can use the file_exists () function to determine whether a picture exists.
Output result:
Let's take a brief look at the file_exists () function:
The file_exists () function checks whether a file or directory exists. Returns true if the specified file or directory exists, false otherwise.
Syntax: file_exists (path)
The parameters are described as follows:
Path: required. Specify the path to be checked.
This is the end of the article on "how to judge whether a picture exists in php". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.