doujiyuan0211 2011-02-19 17:21
浏览 33
已采纳

将脚本上载为纯文本时出现PHP错误

I'm having difficulties believing this question hasn't been asked before, but I couldn't find anything relevant.

Occasionally, when uploading a rather large PHP script, I receive a fatal error similar to something like:

Parse error: syntax error, unexpected $end in [file] on line [line]

A quick refresh later and the error of course disappears as the upload completes. A simple solution is to switch my FTP client's transfer mode to binary, but that seems a bit strange as the script is ASCII.

I'm accustomed to uploading ASP.NET files over plain text, where the server simply waits until the transfer is complete before delivering the page.

What's best practice?

  • 写回答

3条回答 默认 最新

  • dqz7636 2011-02-19 17:29
    关注

    You should transfer your scripts to a staging directory on your server and use ftp move commands to move them live after they have been properly tested in staging.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记