php file_exists() function
Translation results:
英[ɪgˈzɪst] 美[ɪɡˈzɪst]
##vi.Existence; survive; live; continue to existThird person singular: exists Present participle: existing Past tense: existed Past participle: existedphp file_exists() functionsyntax
Function:Check whether the file or directory exists.
Syntax: file_exists(path)
Parameters:
Parameter | Description |
path | Required. Specifies the path to be checked. |
Description: Returns true if the specified file or directory exists, otherwise returns false.
php file_exists() functionexample
<?php $file = file_exists("./test.txt"); echo $file; ?>