file_exist can be checked only using directories.
if u have www folder and a subfolder called uploads ..
u want to check a file 1.jpg exist in that folder
u have ur file in www then u want to write the code as…
echo “file is present”;
u can also use glob function for this purpose.
first take all the files present in a folder and then check with the name…
[cc lang="php"]if (file_exists($_SERVER['DOCUMENT_ROOT'].”/folder/test.txt”) echo “file exists”;[/cc]