diff options
author | andi <andi@splitbrain.org> | 2005-05-01 12:02:29 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-05-01 12:02:29 +0200 |
commit | cbe3402474d1a9f6a563d717ff38d0120425c184 (patch) | |
tree | 3f3e653e6d2bb235bed39a5820daf668c0e62b6e | |
parent | 41a73dcf430e1fb9be61672bfc605626f9ade6c9 (diff) | |
download | rpg-cbe3402474d1a9f6a563d717ff38d0120425c184.tar.gz rpg-cbe3402474d1a9f6a563d717ff38d0120425c184.tar.bz2 |
handle bad permission with a 500
darcs-hash:20050501100229-9977f-ad3b4a20b5f703659310141098b049586e2dccb4.gz
-rw-r--r-- | fetch.php | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -76,8 +76,13 @@ $fp = @fopen($FILE,"rb"); - fpassthru($fp); - fclose($fp); + if($fp){ + fpassthru($fp); + fclose($fp); + }else{ + header("HTTP/1.0 500 Internal Server Error"); + print "Could not read $FILE - bad permissions?"; + } /* ------------------------------------------------------------------------ */ |