Validating file_exists(“test.txt”); is_file(“test.txt”); is_dir(“/temp”); Checking States is_readable(“test.txt”); is_writable(“test.txt”); is_executable(“test.txt”);
Posts from ‘November, 2009’
Directory operation in PHP
Create Directory mkdir(“testdir”); Remove Directory rmdir(“testdir”); Open a Directory for Reading $dh = opendir(“testdir”);
File operation in PHP
Open File fopen() returns false when the file can not be openned. if ($fp=fopen(“test.txt”, “w”)){ //do something } Close File fclose($fp);

