PHP 拒绝使用简写“
发布于 2024-08-07 12:37:02 字数 71 浏览 3 评论 0 原文

我刚刚安装了 php 5.3.0,它不会使用诸如

I just installed php 5.3.0 and it won't run php scripts utilizing short open tags like <?, only <?PHP.

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

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

发布评论

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

评论(3

总攻大人 2024-08-14 12:37:02

您需要更新 php.ini 文件。

设置short_open_tag = 1

请参阅PHP 手册

You need to update your php.ini file.

Set short_open_tag = 1

See the PHP Manual

汹涌人海 2024-08-14 12:37:02

那是因为这只是一种不好的做法。我建议重新转换所有脚本以使用 。如果您很懒,您可以使用查找和替换,如果您可以使用强大的命令行(如 bash),您可以使用 sed 来为您完成此操作。

That's because it's simply a bad practice. I suggest re-converting all your scripts to use <?php. If you're lazy, you can use a find and replace, if you have access to powerful command lines like bash you can use sed to do this for you.

爱殇璃 2024-08-14 12:37:02

https://www.php.net/manual/en/ini.core。 php

你需要

ini_set("short_open_tag", 1)

或者调整你系统的php.ini文件。

https://www.php.net/manual/en/ini.core.php

you need to

ini_set("short_open_tag", 1)

or adjust your systems php.ini file.

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