簡體   English   中英

如何在PHP中回顯ASCII加密文本

[英]how to echo ascii encrypted text in php

我試圖回顯這樣的ascii加密文本:

$x = encrypt("hello there");
 echo $x;

加密函數返回

&#104&#101&#108&#108&#111&#32&#116&#104&#101&#114&#101

但在屏幕上它顯示為“ hello there”。

如何打印原始的ascii值?

您可以在加密周圍使用htmlentities()來轉義&。

$x = htmlentities(encrypt("hello there"));
 echo $x;
$x = encrypt("hello there");
echo htmlentities($x);

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM