简体   繁体   English

在Kohana3中启用树枝

[英]Enabling Twig in Kohana3

I have a problem with twig module for kohana3 (this one https://github.com/jheathco/kohana-twig ). 我对kohana3的树枝模块有问题(这个https://github.com/jheathco/kohana-twig )。

After uploading files to modules/twig, creating cache/twig , views/twig and enabling module in bootstrap.php , i'm getting Internal Server Error 500 error (no matter which action/controller i'm displaying). 将文件上传到modules / twig,创建cache/twigviews/twig并在bootstrap.php启用模块后,我收到Internal Server Error 500错误(无论我显示的是哪个操作/控制器)。 In my apache log file i can find this error message: 在我的apache日志文件中,我可以找到以下错误消息:

PHP Fatal error: main(): Failed opening required '' (include_path='.:/usr/share/php:/usr/share/pear') in /home/bajki/workspace/biospot/modules/twig/init.php on line 4 PHP致命错误:main():无法打开/ home / bajki / workspace / biospot / modules / twig / init中的''(include_path ='。:/ usr / share / php:/ usr / share / pear')。第4行的php

Have anyone any idea what am i doing wrong? 有人知道我在做什么错吗? Thanks in advance. 提前致谢。

It's probably because there are some files missing; 可能是因为缺少一些文件; you have to clone the submodule in vendor folder, so while inside of modules/twig, do: 您必须在供应商文件夹中克隆子模块,因此在模块/树枝内部,执行以下操作:

git submodule update --init

Ok it was my fault - i didn't know that i need to download and install Twig class myself to vendor/Twig. 好的,这是我的错-我不知道自己需要自己下载Twig类并将其安装到供应商/ Twig。 Problem solved! 问题解决了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM