repositories
/
Project_webapp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only allow GET and POST HTTP request and die otherwise.
[Project_webapp.git]
/
lib
/
utils.php
diff --git
a/lib/utils.php
b/lib/utils.php
index e6e0365a410f6c45f460e2c455a1026623f6d678..d937db729cb9f78b9bd54109c811136289de9e18 100644
(file)
--- a/
lib/utils.php
+++ b/
lib/utils.php
@@
-1,9
+1,17
@@
<?php
<?php
-function is
PostR
equest() {
+function is
_post_r
equest() {
if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {
return true;
} else {
return false;
}
}
if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {
return true;
} else {
return false;
}
}
+
+function is_get_request() {
+ if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'GET') {
+ return true;
+ } else {
+ return false;
+ }
+}
?>
?>