require_once(dirname(__FILE__) . '/request.class.php');
class AjaxRequest extends HttpRequest {
function AjaxRequest() {
parent::HttpRequest();
$this->convertValues($this->request);
}
function convertValues($request) {
if (extension_loaded('iconv')) {
foreach($request as $paramName=>$paramValue) {
if (!is_array($paramValue) && is_string($paramValue)) {
$this->request[$paramName] = iconv("UTF-8", _GLOBAL_ENCODING, $paramValue);
} else if (is_array($paramValue)) {
$this->request[$paramName] = $this->convertValues($paramValue);
}
}
}
}
}
?>
0 comments:
Post a Comment