Приветствую!
Откопала древний скрипт, у которого требования:
Цитата |
PHP 4.3.0 or greater MySQL 4.0.0 or greater ionCube support (loaders included in zip) Server: Unix/Linux - Powered by Apache, with .htaccess support (ModRewrite) |
Warning: Invalid argument supplied for foreach() in /sata1/home/.../common.inc.php on line 87
foreach ($vars as $k=>$v){
/**
* Retrieve input vars, trim spaces and return as array
* @return array array of input vars (HTTP_POST_VARS or HTTP_GET_VARS)
*
*/
function get_input_vars(){
global $HTTP_SERVER_VARS;
$REQUEST_METHOD = $HTTP_SERVER_VARS['REQUEST_METHOD'];
global $HTTP_POST_VARS;
global $HTTP_GET_VARS;
$vars = $REQUEST_METHOD == 'POST' ? $HTTP_POST_VARS : $HTTP_GET_VARS;
foreach ($vars as $k=>$v){
if (is_array($v)) continue;
if (get_magic_quotes_gpc()) $v = stripslashes($v);
$vars[$k] = trim($v);
}
$vars['page'] = $_GET['page'];
if (substr($vars['page'], 0, 1) == '/')
{
$vars['page'] = substr($vars['page'], 1);
}
return $vars;
}