如何使用PHP对字符串进行rot13处理? [英] How rot13 on a string using PHP?

查看:87
本文介绍了如何使用PHP对字符串进行rot13处理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很大的php代码,我想手动对其进行编码和解码。

我的问题是php代码内部有很多单引号和双引号,由于它们,我在使用<时出错code> str_rot13()函数如下所示。

那么正确的语法是什么,如何使用下面的函数进行编码:

I have a big php code that i want to encode and decode it manually.
My problem is that php code has many single quotes and double quotes inside and because of them i have errors while using str_rot13() function like below...
So what is the correct syntax and how can I use the function below for encode:

str_rot13 ('That php Code');

我该如何解码该编码文件?我找不到反向功能!

And how can i decode that encoded file? I couldn't find a reverse function!

预先感谢

推荐答案

关于rot13的好处是这是反射性的。两次应用腐烂13(例如腐烂26)会使您回到原来的位置。

The nice thing about rot13 is that it's reflective. applying rot 13 twice (e.g. rot 26) brings you right back to where you came from.

这篇关于如何使用PHP对字符串进行rot13处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆