[Thu Dec 23 18:18:36 2010] [error] [client 127.0.0.1] PHP Fatal error: Undefined class constant 'PDO::ERRMODE_WARNING' in \\server\\kernal.php on line 46kernal.php 46行代码
if(class_exists('config')){
$this->config = new config();//46行
}else{
die('config class is missing!');
}config.php<?php
/*
* qWikiOffice Desktop 1.0
* Copyright(c) 2007-2010, Murdock Technologies, Inc.
* [email protected]
*
* http://www.qwikioffice.com/license
*/class config { /**
* Begin editable code.
* Update the following with your information.
*/ /**
* Domain url
*/
public $DOMAIN = 'www.qwikioffice.com'; /**
* Email address
*/
public $EMAIL = '[email protected]'; /**
* Database connection
* Using PHP Data Objects (PDO)
*/
public $DB_CONN_STRING = 'mysql:dbname=qwikioffice1;host=localhost';
public $DB_USERNAME = 'root';
public $DB_PASSWORD = 'ok'; /**
* Login url
*/
public $LOGIN_URL = 'login.html'; /**
* PDO error mode
*/
public $PDO_ERROR_MODE = PDO::ERRMODE_WARNING; // development environment
//public $PDO_ERROR_MODE = PDO::ERRMODE_SILENT; // production environment /**
* PHP error reporting
* Options are:
* 1. show all
* 2. show only warnings
* 3. show no errors
*/
private $error_reporting = 'show only warnings'; // End editable code /**
* Directories
*/
public $LIBRARIES_DIR = 'modules/common/libraries/';
public $MODULES_DIR = 'modules/';
public $THEMES_DIR = 'resources/';
public $WALLPAPERS_DIR = 'resources/wallpapers/'; /**
* Document root
*/
public $DOCUMENT_ROOT = ''; /**
* __construct()
*
* @access public
*/
public function __construct(){
// set error reporting
switch($this->error_reporting){
case 'show all':
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
break;
case 'show only warnings':
ini_set('display_errors',1);
error_reporting(E_ALL);
break;
case 'show no errors':
error_reporting(0);
break;
} // set the document root
$_SERVER['DOCUMENT_ROOT'] = str_replace('\\', '/', getcwd());
$this->DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'].'/';
} // end __construct()
}
?>
什么问题,好像是php mysql的问题。
if(class_exists('config')){
$this->config = new config();//46行
}else{
die('config class is missing!');
}config.php<?php
/*
* qWikiOffice Desktop 1.0
* Copyright(c) 2007-2010, Murdock Technologies, Inc.
* [email protected]
*
* http://www.qwikioffice.com/license
*/class config { /**
* Begin editable code.
* Update the following with your information.
*/ /**
* Domain url
*/
public $DOMAIN = 'www.qwikioffice.com'; /**
* Email address
*/
public $EMAIL = '[email protected]'; /**
* Database connection
* Using PHP Data Objects (PDO)
*/
public $DB_CONN_STRING = 'mysql:dbname=qwikioffice1;host=localhost';
public $DB_USERNAME = 'root';
public $DB_PASSWORD = 'ok'; /**
* Login url
*/
public $LOGIN_URL = 'login.html'; /**
* PDO error mode
*/
public $PDO_ERROR_MODE = PDO::ERRMODE_WARNING; // development environment
//public $PDO_ERROR_MODE = PDO::ERRMODE_SILENT; // production environment /**
* PHP error reporting
* Options are:
* 1. show all
* 2. show only warnings
* 3. show no errors
*/
private $error_reporting = 'show only warnings'; // End editable code /**
* Directories
*/
public $LIBRARIES_DIR = 'modules/common/libraries/';
public $MODULES_DIR = 'modules/';
public $THEMES_DIR = 'resources/';
public $WALLPAPERS_DIR = 'resources/wallpapers/'; /**
* Document root
*/
public $DOCUMENT_ROOT = ''; /**
* __construct()
*
* @access public
*/
public function __construct(){
// set error reporting
switch($this->error_reporting){
case 'show all':
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
break;
case 'show only warnings':
ini_set('display_errors',1);
error_reporting(E_ALL);
break;
case 'show no errors':
error_reporting(0);
break;
} // set the document root
$_SERVER['DOCUMENT_ROOT'] = str_replace('\\', '/', getcwd());
$this->DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'].'/';
} // end __construct()
}
?>
什么问题,好像是php mysql的问题。
改成$config = new config();试试 $this都是类内部调用 用在这里是神马一丝
;extension=php_pdo_firebird.dll
;extension=php_pdo_informix.dll
;extension=php_pdo_mssql.dll
;extension=php_pdo_mysql.dll
;extension=php_pdo_oci.dll
;extension=php_pdo_oci8.dll
;extension=php_pdo_odbc.dll
;extension=php_pdo_pgsql.dll
;extension=php_pdo_sqlite.dll要用到哪些就打开哪些此外还是需要确认你的PHP扩展文件夹里有没有这些文件,没有的话需要去官方进行下载安装