PHP 5.1.6 下的 Kohana 3
过去几周我一直在尝试 Kohana 3,到目前为止我印象非常深刻。我刚刚将我的项目上传到实时服务器,然后我意识到我需要最新版本的 PHP (5.3) 之一,而我只能使用 5.1.6,以及该服务器。
现在,这可能不是问题的原因,但在视图中找到的每个 PHP 变量都没有正确解析。例如,如果我输出一个链接,
echo Html::anchor('form/registration', 'I Accept,<br />Enter', array('class' => 'left'));
我将得到:
<a href="" class="">
所以我想我缺少他们在最新版本中添加的一些 PHP 功能。有什么想法吗?
I've been experimenting with Kohana 3 for the past few weeks, and up to now I was quite impressed. I just upload my project to the live server, and I realized I needed one of the lastest version of PHP (5.3) and that I'm stuck with 5.1.6, with this said server.
Now, this may not be the cause of the problem, but every PHP variable found in the views aren't parsed correctly. For example, if I output a link
echo Html::anchor('form/registration', 'I Accept,<br />Enter', array('class' => 'left'));
I'll have :
<a href="" class="">
So I guess I'm missing some functionalities of PHP which they added in the lastest version. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我解决了这个问题。问题与PHP的版本有关,我确实将应用程序上传到另一台运行PHP 5.3.X的服务器上,一切正常,证实了我的怀疑。
我确实将错误跟踪到使用 PHP 的 htmlspecialchars (HTML::chars) 的某个函数 - 无论如何,我只是使用 Kohana 2.3 等效函数,现在一切都很好。好吧,我必须处理一些与 PHP 5.1.6 相关的其他问题(为什么,以圣母的名义,任何托管解决方案仍然会使用这个向后版本?),但至少我没有不得不在旧版本 Kohana 的另一个框架下重写该应用程序。
I resolved the issue. The problem was related to the version of PHP, I did upload the app on another server running PHP 5.3.X, and everything was okay, confirming my doubts.
I did track the bug to a certain function which used PHP's htmlspecialchars (HTML::chars) - anyway, I simply used Kohana 2.3 equivalent function and everything is now fine. Well, I had to deal with some other issue, related to PHP 5.1.6 (why, in the name of the holy mother of god, any hosting solution would still be using this backward version?), but at least I didn't had to rewrite the app under another framework of under an older version of Kohana.