GithubHelp home page GithubHelp logo

Comments (12)

L-codes avatar L-codes commented on June 15, 2024

我测试了一下 php 的环境下,没有数据的时候,会返回 Content-Length: 0 ,没有 response body 存在 '\n' 的情况,可以提供截图说明吗?

from neo-regeorg.

Hi-Mike avatar Hi-Mike commented on June 15, 2024

image
php脚本
image
数据读取时打印

from neo-regeorg.

L-codes avatar L-codes commented on June 15, 2024

可是我在模板php中并没有发现末尾有空行,且generate生成的也并无末尾空行,是否你使用了vim等编辑保存了?

from neo-regeorg.

Hi-Mike avatar Hi-Mike commented on June 15, 2024

我直接生成后
用vscode打开的
所以其他人应该也有这种情况

from neo-regeorg.

L-codes avatar L-codes commented on June 15, 2024

你打开了之后保存的 直接生成应该是没有的

from neo-regeorg.

Hi-Mike avatar Hi-Mike commented on June 15, 2024

实际上
github下载及大多数编辑器会默认在文件最后添加一个换行
但是都不是重点
关键在于
我认为应该排除风险
引用php官方说法 https://www.php.net/manual/zh/language.basic-syntax.phptags.php

如果文件内容仅仅包含 PHP 代码,最好在文件末尾删除 PHP 结束标记。这可以避免在 PHP 结束标记之后万一意外加入了空格或者换行符,会导致 PHP 开始输出这些空白,而脚本中此时并无输出的意图。

from neo-regeorg.

L-codes avatar L-codes commented on June 15, 2024

你的gitlab下载命令可以发我看看吗?
另外 这种风险应该怎么避免?

from neo-regeorg.

Hi-Mike avatar Hi-Mike commented on June 15, 2024

直接删除php的闭合

?>

即可

from neo-regeorg.

L-codes avatar L-codes commented on June 15, 2024

会不会存在兼容性问题?php几开始才支持?

from neo-regeorg.

Hi-Mike avatar Hi-Mike commented on June 15, 2024

最早可追溯至php4的文档
具体版本就不是很清楚了

from neo-regeorg.

L-codes avatar L-codes commented on June 15, 2024

OK php4都支持的话 我后续添加该建议到下个版本发布 感谢:)

from neo-regeorg.

L-codes avatar L-codes commented on June 15, 2024

直接 clone 可以获取到 3.8.0 的预览版,已参考该建议,修复这个问题

from neo-regeorg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.