PHP 编码字符串加上当前日期
我不知道如何在有点短的乱码结果中对字符串+当前时间进行编码...类似:
$random = base64_encode($_POST['phone']);
将日期附加到也已编码的电话变量中,当我执行上述操作时,它会出现长乱码混乱,我希望它短一些。有没有办法做到我所缺少的?
I can't figure out how to encode a string + current hour in a somewhat shortish garbled result... something like:
$random = base64_encode($_POST['phone']);
with a date appended to the phone var that's also encoded, when I do the above it comes out to a long garbled mess, I'd like it to be somewhat shorter. Is there a way to do this that I'm missing ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会从字面上回答你的问题,因为我无法深入了解你的实际用例或你的真正目标是什么。
请记住,这并不是真正的随机字符串,并且您将把数据编码成一种形式,以防止您将两个单独的数据分开。
I'll answer your question literally, since I can't get any insight into your actual use case or what your real goals are.
Just keep in mind that this is not truly a random string, and that you'll be encoding your data into a form that will prevent you from picking apart the two separate pieces of data.