PHP ini设置强制直接打印php代码?

发布于 2024-10-06 10:24:25 字数 118 浏览 0 评论 0原文

在 php ini 中,哪个设置将强制直接在 html 中打印 php 代码?

我发现我的一些使用 obstart 的代码会有这个问题

,但如果我复制其他服务器 php.ini,它会正常播放

in php ini, which seeting will force print the php code direcly in html?

i found that some of my code which using obstart will have this problem

but if i copy the other server php.ini, it play normally

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

相对绾红妆 2024-10-13 10:24:25

在 httpd.conf 中

// comment out this line
# AddType application/x-httpd-php .php

In httpd.conf

// comment out this line
# AddType application/x-httpd-php .php
可遇━不可求 2024-10-13 10:24:25

没有任何配置设置可以将您的代码直接打印为 HTML。

在代码中使用短开放标记(例如 )并且不在配置中启用它们可能会出现问题,但这就是我能想到的。

其他任何问题都可能是您的服务器配置和/或模块的错误。

There is no configuration setting that will print your code directly into HTML.

There may be an issue with using short open tags (eg <? ... ?>) in your code and not enabling them in configuration, but that's all I can think of.

Anything else would be the fault of your server configuration and / or modules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文