dongshipang8094 2011-04-23 11:01
浏览 682
已采纳

base64_encode和解码转义字符问题

Hi I've made a paste bin site to share code with a school work group, the problem that I have is when I save code in the db I use base64_encode(code), when I try to show with base64_decode(code) it shows with escaped chars like:

#!/bin/bash

printf \"thi is a test\"\


exit 0

How can I show it, with out escaped chars?

Thanks, Manolo

  • 写回答

1条回答 默认 最新

  • dongpigui8898 2011-04-23 18:07
    关注

    It looks like your web hosting provider has the "magic quotes" mis-feature enabled. Magic quotes is the product of a bygone era of PHP and should no longer be used.

    You should probably disable them. In particular, you're suffering from magic_quotes_runtime, which can be disabled on a script-by-script basis rather than needing an .htaccess or php.ini change.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部