Jump to content

how to set the encoding of $_POST array


seco

Recommended Posts

Hi

my $_post when i debug it i found it utf-8 encoded and i use utf8.class and load the map file to convert the encoding an i write the following

 

require_once("c_utf8/utf8.class.php");

$utf8 = new utf8(CP1256);

for( reset( $_POST);  $key = key( $_POST);  next( $_POST) ) {

if (is_string($_POST[$key])) $mypost[$key]= $utf8->utf8ToStr($_POST[$key]);

}

 

i found that it print the contents of the map file to my page !!!!! why?

any help

and this is utf8.class

http://www.phpclasses.org/browse/package/1974.html

 

thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/90647-how-to-set-the-encoding-of-_post-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.