Posted by lvaro G. Vicario on 08/13/07 13:23
Bob Sanderson escribió:
> Thanks for the reply but I'm a beginner with PHP and frankly, don't
> understand any of what you said. Is there another, simple way to
> determine if a file exists?
You're trying to find out whether a URL points to a valid resource
without actually fetching the file. Are you sure that's what you really
need? If you just need to get a file from you own server you don't need
to play with HTTP: feed file_exists() with a file system path:
$file=$_SERVER['DOCUMENT_ROOT'].'/images/dwg_images/5005/5005001_.pdf';
if( file_exists($file) ){
// Whatever
}
--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor austrohúngaro: http://www.demogracia.com
--
Navigation:
[Reply to this message]
|