You can use the file_exists() function to check whether a file or directory exists.
Here is an example:
<?php$file = "abc1.csv";$dirname = "/home/user/php";//if (file_exists($file)){if (file_exists($dirname)){ print("File exists\n");}else{ print("File does not exist\n");}?>