我正在尝试将一个十六进制链接转换为另一个页面上的文本。
以下是应该做到这一点的部分代码:
URL = url.php?post=48656c6c6f20736972733f
$file = $_GET['post'];
$file = pack("H*",bin2hex($file));
echo "<h2 class='center'>The file " . $file . " does not exist</h2>";
或
$title = pack("H*",bin2hex($_GET['post']));
$title = ucfirst($title);
echo $title;
其输出为"48656c6c6f20736972733f"
找到答案
pack("H*", $file);
工作出色的