PHP Kohana 包含问题

发布于 2024-10-19 00:14:39 字数 764 浏览 1 评论 0原文

我现在正在处理一个非常奇怪且相当简单的问题大约两天了。 我敢打赌解决方案是显而易见的,但我只是不知道还能做什么。

我正在 Kohana 框架中工作。 在我的 C:/wamp/www 文件夹中,我有两个不同的站点:mysite1 和 mysite2。

所以我让 fckeditor 在 mysite1 站点中工作,如下所示:

包括(url::base(FALSE)。“static/scripts/fckeditor/fckeditor.php”); ->包括(mysite/web/admin/static/scripts/fckeditor/fckeditor.php)

并且效果非常好!

好吧,我决定将 fckeditor 合并到 mysite2 中,并且我使用完全相同的命令.. 它只是不起作用,并且出现错误消息:

没有这样的文件或目录。

我向你保证 fckeditor 存在于

中 mysite2/web/admin/static/scripts/fckeditor/fckeditor.php 。

完整路径(C:/wamp/www/mysite2/web/admin/static/scripts/fckeditor/fckeditor.php)路径包含作品 我只想让 include(url::base(FALSE)."static/scripts/fckeditor/fckeditor.php") 工作...

可能出了什么问题?

谢谢!

I am dealing with a very strange and rather simple problem about 2 days now.
I bet the solutions is obvious but i just dont know what else to do.

I am working in Kohana framework.
In my C:/wamp/www folder i have two different sites: mysite1 and mysite2.

So i have the fckeditor working in the mysite1 site included like this:


include(url::base(FALSE)."static/scripts/fckeditor/fckeditor.php"); -> include(mysite/web/admin/static/scripts/fckeditor/fckeditor.php)

and works like a charm!

Well i decided to incorporate fckeditor in mysite2, and i use the very same command..
and it just does not work and there is an erro message:

no such file or directory..

I assure you that fckeditor exists in


mysite2/web/admin/static/scripts/fckeditor/fckeditor.php

The full path (C:/wamp/www/mysite2/web/admin/static/scripts/fckeditor/fckeditor.php ) path include works. I just want to get include(url::base(FALSE)."static/scripts/fckeditor/fckeditor.php") working...

What could possibly be wrong??

Thanks!

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

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

发布评论

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

评论(2

好菇凉咱不稀罕他 2024-10-26 00:14:39

当您需要包含文件时,可以使用 find_file() 方法。所以,你的代码看起来像

include Kohana::find_files("static", "/scripts/fckeditor/fckeditor");

When you need to include files, you can use find_file() method. So, your code will looks like

include Kohana::find_files("static", "/scripts/fckeditor/fckeditor");
鸠魁 2024-10-26 00:14:39

如果完整路径工作正常,但使用 url 帮助程序的路径不起作用,则可能是站点配置错误。

您使用 url::base 包含的内容是否有效?

查看页面的输出,url::base(FALSE)."static/scripts/fckeditor/fckeditor.php" 的计算结果是什么?

查看 config.php,确保您的 site_domain 设置正确。

If the full path works fine, but the path using the url helper doesn't work, it's probably a site configuration error.

Do any of your includes using url::base work?

Looking at the output of your page, what does url::base(FALSE)."static/scripts/fckeditor/fckeditor.php" evaluate to?

Take a look at config.php, make sure your site_domain is set up properly.

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