<?php
echo "<form action='' method='post'>";
echo "Number Conmand:<input name='text' type='text'>";
echo "<input type='submit' name='sub' value='check'>";
echo "</form>";
define("PI",3.1415926);
function Encrypt($str)
{
return $str=$str+PI;
}
function Decrypt($str)
{
return $str=$str-PI;
}
if($_POST[sub])
{
echo "encryption conmand ".Encrypt($_POST[text])."<br>";
$_SESSIION[pwd]=Encrypt($_POST[text]);
?>
<a href='44.php?pwd=1'>decrypt conmand</a>
<?php
}
if(isset($_GET[pwd]))
{
echo "decrypt conmand ".Decrypt($_SESSION[pwd]);
}
?>
自定义函数
最新推荐文章于 2024-09-11 21:30:17 发布
