2010年10月11日 星期一

File exist

File Checking

The -e part is the existence test. After that we have a space, followed by the file we want to test. As in the other sections, we could also use a variable to hold the file name:

$neededfile="myfile.cgi";
if (-e $neededfile)
{
#proceed with your code
}


Reference:
http://www.pageresource.com/cgirec/ptut17.htm

沒有留言:

張貼留言