função file_exists PHP ()
Definição e Uso
file_exists () função verifica o arquivo ou diretório existe.
Se o arquivo ou diretório especificado existe retorna TRUE, caso contrário, retorna FALSE.
gramática
file_exists(path)
参数 | 描述 |
---|---|
path | 必需。规定要检查的路径。 |
Exemplos
<?php
echo file_exists("test.txt");
?>
echo file_exists("test.txt");
?>
O código acima exibirá:
1
Manual Completo PHP Sistema de Arquivos de Referência