흔히 사용하는 db정보가 들어있는, config.php, dbinfo.php, lib.php 등등.. 쉽게 사용하는 파일명인데요..
보통 로드하면 아무화면이 안나오죠, 게다가 에러가 나지 않으니 그 파일은 분명 있다는 거구요.
그리고 저런 파일명이라면, 대부분 db정보가 들어있을 확률이 높고, 그럴일은 없겠지만, 만약에 대비한것입니다.;;
파일이 없다고 에러를 날려버리는게 상책입니다.;
include 나 require 에는 지장을 주지 않고, url을 타고 틀어왔을때만 뿌려줍니다.
if(ereg("파일명",$_SERVER[PHP_SELF]))
{
header("HTTP/1.0 404 Not Found");
exit;
}
또는 특정페이지로 이동시킬때.
if(ereg("파일명",$_SERVER[PHP_SELF]))
{
header("location:이곳에url");
exit;
}
=================================================================
응용편
<?
header("HTTP/1.0 404 Not Found");
exit;
?>
위 소스를 복사해서 php계정에 올리면 됩니다.
응용
-------------------------------------------------------
100 ㅡ Continue,
101 ㅡ Switching Protocols,
200 ㅡ OK,
201 ㅡ Created,
202 ㅡ Accepted,
203 ㅡ Non-Authoritative Information,
204 ㅡ No Content,
205 ㅡ Reset Content,
206 ㅡ Partial Content,
300 ㅡ Multiple Choices,
301 ㅡ Moved Permanently,
302 ㅡ Moved Temporarily,
303 ㅡ See Other,
304 ㅡ Not Modified,
305 ㅡ Use Proxy,
400 ㅡ Bad Request,
401 ㅡ Unauthorized,
402 ㅡ Payment Required,
403 ㅡ Forbidden,
404 ㅡ Not Found,
405 ㅡ Method Not Allowed,
406 ㅡ Not Acceptable,
407 ㅡ Proxy Authentication Required,
408 ㅡ Request Time-out,
409 ㅡ Conflict,
410 ㅡ Gone,
411 ㅡ Length Required,
412 ㅡ Precondition Failed,
413 ㅡ Request Entity Too Large,
414 ㅡ Request-URI Too Large,
415 ㅡ Unsupported Media Type,
500 ㅡ Internal Server Error,
501 ㅡ Not Implemented,
502 ㅡ Bad Gateway,
503 ㅡ Service Unavailable,
504 ㅡ Gateway Time-out,
505 ㅡ HTTP Version not supported
[출처] 웹디황용
"쇼핑몰·홈페이지·오픈마켓
블로그·페이스북·이메일 등의 각종 마케팅 글쓰기, 각종 광고, 영업, 판매, 제안서, 전단지 반응율 3배×10배 이상 높이는 마법의 8단계 공식" |
☞자세히보기 |
|
|