I'm trying to encode my script using base64
in php, but why my code automatic adds backslashes \
at single quotes '
or double quotes "
this is the code I am using to encode
$encode = $_POST ['encode'];
$encod = base64_encode ($encode);
echo "<form action='?' method='post'><textarea name='encode'></textarea><input type='submit' value='Encode'></form><textarea> ".$encod." </textarea>";
I use code at above, then I try to encode this script:
echo "just test";
echo 'or just test';
and result
PD9waHAgZWNobyBcImp1c3QgdGVzdFwiOw0KZWNobyBcJ29yIGp1c3QgdGVzdFwnOyA/Pg==
when I decode, result
echo \"just test\";
echo \'or just test\';
how to delete backslashes??
I've tried using str_replace
on $encod
, and stripslashes($encod)
but it does not work.