mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Switch to general API nearly done.
This commit is contained in:
parent
a60d5556af
commit
d7f1c68366
13 changed files with 226 additions and 142 deletions
|
@ -30,6 +30,24 @@ function use_request_params($keys) {
|
|||
return $values;
|
||||
}
|
||||
|
||||
function use_optional_request_params($keys) {
|
||||
|
||||
if (!is_array($keys)) {
|
||||
$keys = func_get_args();
|
||||
}
|
||||
|
||||
$values = array();
|
||||
foreach ($keys as $key) {
|
||||
if (array_key_exists($key, $_REQUEST)) {
|
||||
$values[] = $_REQUEST[$key];
|
||||
unset($_REQUEST[$key]);
|
||||
} else {
|
||||
$values[] = null;
|
||||
}
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
|
||||
function delete_tempfile($file) {
|
||||
|
||||
@unlink($file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue