<?php $fd = fopen("c:/temp/a.txt","r");
if ( is_resource($fd) ) { print "resource"; } else { print "not resource"; } ?>