<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[url]http://www.w3.org/TR/html4/loose.dtd">[/url] <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=big5"> <title>MD5编码转换</title> <link href="../e-learn.css" rel="stylesheet" type="text/css"> </head> <body> <div align="center"> <form action="0001.php" method="post" enctype="application/x-www-form-urlencoded" name="form1" target="_self"> <p>请将您的原始字串贴入下面的文字栏位中 </p> <p> <textarea name="textarea1"></textarea> </p> <p> <input type="submit" name="Submit" value="转换成MD5编码"> </p> <p>以下为您的原始字串经过MD5编码转换后的结果</p> <p> <?php if($_POST['textarea1']!=""){ echo md5($_POST['textarea1']); }else{ echo "您没有输入任何字串!"; } ?> </p> </form> </div> </body> </html>
<?php $str="请在这边打入你的密码"; $str_md5=md5($str); echo $str_md5; ?>