douhan8009 2016-03-08 22:56
浏览 80
已采纳

如何逃避已经在php中转义单引号的反斜杠?

So I have a script that creates a script that can then create another script. See below, I have written (how do I escape this) where I'm not sure what to do.

fwrite($file, ' 

                fwrite($file, \'

                                 fwrite($file, (how do i escape this)\' (how do i escape this)\'

\'
');
fclose;

I really hope that makes sense to someone!

  • 写回答

1条回答 默认 最新

  • doushou3814 2016-03-08 22:58
    关注

    To escape a backslash add another one:

    echo " Escape \\";
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Jenkins+k8s部署slave节点offline
  • ¥15 微信小游戏反编译后,出现找不到分包的情况
  • ¥15 如何实现从tello无人机上获取实时传输的视频流,然后将获取的视频通过yolov5进行检测
  • ¥15 WPF使用Canvas绘制矢量图问题
  • ¥15 用三极管设计一个单管共射放大电路
  • ¥15 孟德尔随机化r语言运行问题
  • ¥15 pyinstaller编译的时候出现No module named 'imp'
  • ¥15 nirs_kit中打码怎么看(打码文件是csv格式)
  • ¥15 怎么把多于硬盘空间放到根目录下
  • ¥15 Matlab问题解答有两个问题