php页面间传值

来源:互联网 发布:java实现简单的记事本 编辑:程序博客网 时间:2024/06/03 22:58

例如:

A.php

<?php

$usernane

?>

要将A.php重的$usernane值传给另外一个页面(B.php)中的实现方法:

<meta   http-equiv='refresh'   content='0;url='B.php?user=$username'>   
  接收   
  echo   $_GET['user'];

这样,就可以在B.php中访问$username的值

B.php

<?php

echo $_GET['user'] ;

?>

原创粉丝点击