将 PHP 替代语法与 WAMP 结合使用
是否可以在 WAMP 上使用 PHP 替代语法(如 CodeIgniter 用户指南中所述)?
Is it possible to use PHP alternate syntax (as described in the CodeIgniter user guide), on WAMP?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这应该完全由 PHP 控制,而不是由 WAMPServer 或您运行的环境控制。
您需要找到您的 php.ini 文件并设置
short_open_tag = 1
,尽管这应该已经设置好了。我知道某些 PHP 安装可能会将 php.ini 放在随机位置。要找出文件位置,只需在任何 php 文件中调用
phpinfo();
即可。在顶部附近,您应该找到加载的 php.ini 文件的位置。我希望这对您有所帮助。
This should be entirely PHP controlled, not by WAMPServer or the environment in which you are running.
You need to find your php.ini file and set
short_open_tag = 1
, although this should already be set.I know some installs of PHP can put php.ini in random places. To find out the file location, simply call
phpinfo();
in any php file. Relatively near the top, you should find the location of the loaded php.ini file.I hope this can be of help to you.
是的,我不相信替代语法是依赖于环境的,因为它是语言的一部分。这与 PHP 短标签不同,两者是相互独立的。
http://php.net/manual/en/control-structs。替代语法.php
yes it is, i don't believe alternate syntax is environment dependent as it's a part of the language. This is not the same as PHP shorttags, the two are independent of each other.
http://php.net/manual/en/control-structures.alternative-syntax.php
CI 在 application/config.php 中有一个选项可以动态重写
不确定这会导致什么样的性能影响,但我肯定使用 i
CI has an option in application/config.php to dynamically re-write
not sure what kind of performance impact this causes but i certainly use i