Вопрос

I have to decode a large string base64 encoded:

<?php
        $str ='base64code';
    echo base64_decode($str);
?>

The link contains the base64 encoded string: http://www.interwebmedia.nl/dataxi/base64.txt

Online decoders give the right result but this php function doesn't. Is there a solution?

Это было полезно?

Решение

base64_decode outputs exactly what was encoded before. It does not adapt any contained values.

You are writing everything out in HTML context. And there any <tags> will not be shown in the browser window. Use show source. Or htmlspecialchars.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top