gpt4 book ai didi

php - 如果未找到 PHP 标记,则 PHP 中的 Sublime 代码突出显示不起作用

转载 作者:搜寻专家 更新时间:2023-10-31 21:26:03 25 4
gpt4 key购买 nike

我正在使用 Sublime,一些 PHP 文件没有封闭的 PHP 标签。这让 Sublime 感到困惑,并且没有代码高亮显示。即使将语法设置为 PHP 仍然会显示未高亮的代码

问题:没有标签

enter image description here

预期:带有标签

enter image description here

有什么想法吗?

最佳答案

来自PHP documentation :

When a file is included, parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags.

Sublime Text 只是遵循这个建议!

关于php - 如果未找到 PHP 标记,则 PHP 中的 Sublime 代码突出显示不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35981930/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com