开发者

about post data

everyone.my question like this:

pos开发者_如何转开发t.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));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜