【问题标题】:Creating a Base64 Coder and Decoder tool (PHP) [closed]创建 Base64 编码器和解码器工具(PHP)[关闭]
【发布时间】:2013-03-14 04:41:18
【问题描述】:

你好吗?我有一个网站,我有一些网站管理员工具。我有 PHP base64 的解码器和编码器。这些工具来自外部网站……我使用 iframe。但是不专业。我不是 php 专业人士,但我希望在我的网站上拥有这样的工具……我只需要表单代码和 php 代码即可获取 uncode 或代码 base64。 有人可以帮我解决这个问题吗?

问候,亚历克斯

【问题讨论】:

  • 这个问题应该被删除。

标签: php base64


【解决方案1】:
【解决方案2】:

我刚做了这个;而且很简单。

<?php
//this is a first-draft, untested
$encode = $_POST['encode'];
$decode = $_POST['decode'];
?>
<html>
<head>
<title>
Awesome Base64 Transcoder
</title>
</head>
<body>
<form action="" method="POST">
To encode: <input type="text" name="encode" value="<?php echo base64_decode($decode);?>">
<input type="submit" value="Encode">
</form>
<br />
<form action="" method="POST">
To decode: <input type="text" name="decode" value="<?php echo base64_encode($encode);?>">
<input type="submit" value="Decode">
</form>
</body>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-05-18
    • 1970-01-01
    • 2015-12-26
    • 1970-01-01
    • 2021-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多