Zend:为什么表单元素在 Windows 中无法正确呈现?原来是在ubuntu上运行的
我在 Ubuntu 上使用 Zend,它工作正常。现在我转移到 Windows 来完成同一个项目。但现在我的表单元素未正确呈现,它们的代码出现在浏览器的页面上,如下所示:
translate( $this->element->getElement("email")->getLabel() ) ?>
知道问题是什么吗?
I was working with Zend on Ubuntu and it was working correctly. Now I moved to windows for same project. But now elements of my form are not rendered correctly and their code is appeared on brower's page like this:
translate( $this->element->getElement("email")->getLabel() ) ?>
Any idea that what is the problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,这可能是 php.ini 问题,您需要启用它short_open_tag = On并重新启动服务器
就像我上面描述的那样它应该可以工作。但就像弗朗茨已经说过的那样,你真的应该避免使用短标签。如果您必须分发文件或更改到不同的服务器,只会再次引起麻烦。你应该做的是使用编辑器的查找和替换所有功能,并将所有短标签替换为普通的 php 标签
Yes it is probably a php.ini issue you need to enable it short_open_tag = On and restart the server
Like I described as above it should work. But like Franz already said you should really avoid using the short tags. If you have to distribute your files or change to a different server it will only cause trouble again. What you should do is use the find and replace all function of your editor and replace all the short tags with the normal php tag
您是否可能使用短开始标记 (
) 而不是正确的长版本,并且 Windows 系统上的
php.ini
中未启用该标记?您可以打开该功能(指令
short_open_tag
),也可以“转换”您的开始标记。我会推荐后一种解决方案,因为它是跨平台(因此是好的)做事方式。
Is it possible that you use short opening tags (
<?
) instead of the correct long version and that is not enabled in yourphp.ini
on the Windows system?You can either turn that feature on (directive
short_open_tag
) or you can "convert" your opening tag(s).I would recommend the latter solution, because it is the cross-platform (and thus, good) way of doing things.