|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /home/queenjbs/www/test/ |
Upload File : |
<?include $_SERVER['DOCUMENT_ROOT']."/conf/conf_dir.php";?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
$fruits= array( 'apple', 'orange', 'strawberry', 'peach' );
?>
<form name="form1" method="post" action="test_arr.php">
<input type="hidden" name="fruitsarray" value="<?=urlencode(serialize($fruits))?>" />
<input type="submit" name ="submit" value="submit" />
</form>
<a href="test_arr.php?fruitsarray1=<?=base64_encode(serialize($fruits))?>">submit</a>
//¹ÞÀ»¶§:
<?php
$fruitsReceived = unserialize(urldecode($_POST['fruitsarray']));
print_r( $fruitsReceived ); //apple, orange, strawberry, peach
echo "<br>";
echo $fruitsReceived[2];
$fruitsReceived1 = unserialize(base64_decode($_GET['fruitsarray1']));
print_r( $fruitsReceived1 ); //apple, orange, strawberry, peach
echo "ssss<br>";
echo $fruitsReceived1[1];
?>