PHP H 型包装不工作
PHP pack with type H doesn't work
我正在尝试将十六进制 link 转换为另一页上的文本。
这是应该执行此操作的部分代码:
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);
效果很好
我正在尝试将十六进制 link 转换为另一页上的文本。
这是应该执行此操作的部分代码:
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);
效果很好