Functions
WebDev/*nix assorted functions & hacks
Search
find all
Array
-
Bash
-
Classes
-
Config
-
DateTime
-
Debug
-
dotjs
-
File
-
foooo
-
Git
-
HTML
-
Images
-
Javascript
-
Linux
-
Math
-
Misc
-
MySQL
-
OS X
-
Reading
-
Redis
-
Shell scripts
-
snippets
-
SQL
-
Strings
-
TextMate
-
Web
-
\(^o^)/ Fun!
-
_Misc hacks
-
_Pages
snippets
.htaccess / mod_rewrite
404 header
Ajax response page
Basic HTTP Auth
Column display sans near-empty columns
JavaScript favelets/bookmarklets
misc php stuffs
php tricks
8
found
auth
Name:
Category: snippets
Body:
// can be useful to 'hide' pages if (! $condition) { @header('HTTP/1.0 404 Not Found'); # suppressed error in case of headers already sent die("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL {$_SERVER['REQUEST_URI']} was not found on this server.</p> <hr> <address>{$_SERVER['SERVER_SOFTWARE']} Server at {$_SERVER['HTTP_HOST']} Port {$_SERVER['SERVER_PORT']}</address> </body></html>"); }
Footer