遇到一段代码,从数据库里读出来带 \ 字符

需要转义成中文~

用到url_decode();

 //$info 为刚从数据库中读取的二维数组

 foreach($info as $key1 => &$value1) {
     foreach($key1 as $key2 => &$value2) {
            if($key2 == 'url转义字段' )   //判断是否是要转义的字段
            {
                   $value = url_decode(str_replace('\\','%',$value));
              }
 }

 //本处用到引号传参

然后会以正常的中文形式显示。

最新文章

  1. 系统进程 zygote(三)—— app_process 的 main 函数
  2. 如何获取Flickr图片链接地址作为外链图片
  3. UVA 1546 - Complete the sequence!(差分法)
  4. DB主从一致性架构优化4种方法
  5. 【mongodb系统学习之十一】mongodb删除数据
  6. node,cnpm安装和配置
  7. linux中open函数使用
  8. android 基础题
  9. java基础篇---HTTP协议
  10. [luogu3980] 志愿者招募
  11. 基于R语言的时间序列分析预测
  12. SSH连接与自动化部署工具paramiko与Fabric
  13. 在C#中使用WMI查询进程的用户信息
  14. Laravel 完整开源项目大全
  15. 如何彻底修改eclipse中的名称
  16. Put queue for MemoryTransaction of capacity 10000 full, consider committing more frequently, increasing capacity or increasing thread count flume capacity 时间数
  17. 20145333 《Java程序设计》第7周学习总结
  18. axis2 webService开发指南(2)
  19. ASP.NET Core ASP.NET Core+MVC搭建及部署
  20. Java中String与Date格式之间的转换

热门文章

  1. cocos2d-x学习笔记
  2. IOS 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: URLString'
  3. Chapter 1 Securing Your Server and Network(6):为SQL Server訪问配置防火墙
  4. 关于no system images installed for this target解决方法
  5. Android开发之”再按一次退出程序“的实现
  6. CVPR 2013 录用论文【待更新】
  7. iOS之获取当前时间日期并按固定格式显示
  8. Web网站与Web应用程序区别
  9. Hibernate事务管理
  10. oracle数据库没有监听服务与实例服务(OracleServicesXX)的解决方法