repositories
/
Project_webapp.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Only allow GET and POST HTTP request and die otherwise.
[Project_webapp.git]
/
lib
/
utils.php
1
<
?php
2
function
is_post_request
() {
3
if
(
filter_input
(
INPUT_SERVER
,
'REQUEST_METHOD'
) ===
'POST'
) {
4
return true
;
5
}
else
{
6
return false
;
7
}
8
}
9
10
function
is_get_request
() {
11
if
(
filter_input
(
INPUT_SERVER
,
'REQUEST_METHOD'
) ===
'GET'
) {
12
return true
;
13
}
else
{
14
return false
;
15
}
16
}
17
?
>