关于发布数据

everyone.my question like this:

post.php

<?php
$str = "testmytest";
$str_serialize = serialize($str);

http_post_fields("get_post.php", array('str' => $str_serialize));
?>

get_post.php

<?php
if (isset($_POST['str']))
{
  $echo $_POST['str'];

  $str = unserialize($_POST['str']);

  echo $str;
}
?>

i can not unserialize the $str, it is changed.who knows why? Thanks for everybody.

You need to provide associative array for http_post_fields function:

http_post_fields("get_post.php", array('str' => $str_serialize));

The data parameter in http_post_fields() should look like this:

http_post_fields('get_post.php', array('str' => $str_serialize));