我已经编写了一段PHP代码,它从get请求中获取列表id并加密并返回。当我在ubuntu中从命令提示符运行时,这很好,但当我从URL请求尝试时,每次都会给出相同的输出。它也没有给出任何错误。无法理解。有人能帮忙吗?
<?php
if( $_GET["list"]) {
$encryptionMethod = "AES-256-CBC";
$api_key ="2lYVdI37JfbUgys5kOAu";
$encrypted = version_compare(PHP_VERSION, '5.3.3') >= 0 ? openssl_encrypt($in, $encryptionMethod, $api_key, 0, '3j9hwG7uj8uvpRAT') : openssl_encrypt($in, $encryptionMethod, $api_key, 0);
$encrypted = str_replace('/', '892', $encrypted);
$encrypted = str_replace('+', '763', $encrypted);
$encrypted = str_replace('=', '', $encrypted);
echo $encrypted;
exit();
}
?>
提前感谢。!
明白了。THanks@Volkerk。
我已经分配了价值并使其发挥作用。
非常感谢。