当我试图进入kohana中的索引页时,我一直收到这个错误。
Kohana_HTTP_Exception 404 :在此服务器上找不到请求的localwebsite/admin。
SYSPATH\classes\Kohana\Request\Client\Internal.php 79
if ( ! class_exists($prefix.$controller))
{
throw HTTP_Exception::factory(404,'The requested URL :uri was not found on this server.'
我试图在根目录中的install.php文件中使用Kohana类,但是当我尝试使用它时,我会看到以下内容:
install.php
require_once ("system/classes/Kohana.php");
$kohana = new Kohana();
// out: Fatal error: Class 'Kohana_Core' not found in \system\classes\Kohana.php on line 3
我是第一次使用kohana框架,所以我遵循了使用"hello world“程序设置它的过程,但我总是得到一个空白页面。下面是我的控制器和引导程序文件:
控制器文件:
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Welcome extends Controller {
public function action_index()
{
echo "Hello, World!";
}
我正在使用Kohana3.3,我在这个中读到了。
它说,为了防止向最终用户显示堆栈跟踪,我需要覆盖Kohana_Exception::_handler(),以便对渗出的错误做一些不同的处理。这是否意味着覆盖Kohana_Exception并添加以下函数?
public static function _handler(Exception $e)
{
try
{
// Log the exception
Kohana_Exception::log($e);
// Generate the response
//in
各自的所有!
如何在MySQL数据库中存储Kohana配置文件(电子邮件、身份验证、分页)?
任何帮助都将不胜感激。
经过一些练习,我解决了这个问题。
步骤1:创建表(来自Kohana源代码的代码
/modules/database/classes/Kohana/Config/Database\Writer.php`)
CREATE TABLE IF NOT EXISTS config (
group_name varchar(128) NOT NULL,
config_key varchar(128) NOT NULL,
config_value text,
PRI
我在实践中并没有太多地使用抽象类,尽管我理解它们是什么:一种对子类指定必须实现哪些方法的方法。
我刚刚将一个Kohana项目放到了Doxygen中,并且可以看到整个类的层次结构。我看到,在链条的顶端,我们有一个工厂:
abstract class Kohana_Model {
public static function factory($name){
// Add the model prefix
$class = 'Model_'.$name;
return new $class;
}
}
在它的下面直接
我在kohana 3.0.12上的一个网站上工作,我已经安装了一个模块,它记录了一些错误。所有的工作都很好,除了当我想要有效地记录一个错误时,我得到一个错误,我不知道如何管理它。
下面是杂乱的代码:
public static function handler(Exception $e)
{
// It's a nice time to log :)
Kohana::$log->add(Kohana::ERROR, Kohana_Exception::text($e));
etc code here
那么Kohana_Exception::text(
我正在学习kohana,我使用的是ver:3.3.0。
我得到了一个错误:
Kohana_HTTP_Exception [ 404 ]: The requested URL calendar was not found on this server.
SYSPATH\classes\Kohana\Request\Client\Internal.php [ 79 ]
SYSPATH\classes\Kohana\Request\Client\Internal.php [ 79 ]
SYSPATH\classes\Kohana\Request\Client.php [ 114 ] » Kohan
我从他们的网站下载了kohana,并在PHP 5.2.17上安装了Kohana 3.2.3,它给出了错误。
The configured system directory does not exist or does not contain required files.
致命错误: require() pear:在第7行的/vol/vhosts/dev.abc.com/httpdocs/folder1/application/bootstrap.php中打开所需的'/vol/vhosts/dev.abc.com/httpdocs/folder1/system/classes/koha
您好,我的kohana代码有问题,它给我带来了同样的错误,我认为是htaccess或bootstrap有问题
它安装在我的根目录下,而不是作为一个子文件夹。
Kohana_HTTP_Exception [ 404 ]: The requested URL / was not found on this server.
SYSPATH/classes/Kohana/Request/Client/Internal.php [ 79 ]
74 if ( ! class_exists($prefix.$controller))
75 {
76