如何在PHP中创建自己的编码器和解码器
我已经创建了一个表单,我想在其中编码唯一的id,然后发送到其他页面。意味着我想使用PHP创建自己的编码器和解码器。您可以使用uuencode函数进行编码。尝试使用此示例如何在PHP中创建自己的编码器和解码器,php,decode,encode,Php,Decode,Encode,我已经创建了一个表单,我想在其中编码唯一的id,然后发送到其他页面。意味着我想使用PHP创建自己的编码器和解码器。您可以使用uuencode函数进行编码。尝试使用此示例 <?php //encode string $str="www.facebook.com"; $encode=convert_uuencode($str); echo $encode; $decode= convert_uudecode($encode); echo $decode; ?>
<?php
//encode string
$str="www.facebook.com";
$encode=convert_uuencode($str);
echo $encode;
$decode= convert_uudecode($encode);
echo $decode;
?>