zend framework Bootstrap.php数据库适配器配置及错误解决
来源:互联网 发布:linux sleep 头文件 编辑:程序博客网 时间:2024/06/10 15:06
( ! ) Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'parse_ini_file(F:\xampp\htdocs\zendfrm\application\application.ini) [function.parse-ini-file]: failed to open stream: No such file or directory' in F:\xampp\htdocs\zendfrm\library\Zend\Config\Ini.php on line182
( ! ) Zend_Config_Exception: parse_ini_file(F:\xampp\htdocs\zendfrm\application\application.ini) [function.parse-ini-file]: failed to open stream: No such file or directory in F:\xampp\htdocs\zendfrm\library\Zend\Config\Ini.php on line182
Call Stack
#
Time
Memory
Function
Location
1
0.0030
340224
{main}( )
..\index.php:0
2
0.0048
434800
Zend_Application->__construct( string(11),string(59) )
..\index.php:24
3
0.0098
781416
Zend_Application->setOptions( array(5) )
..\Application.php:92
4
0.0099
782672
Zend_Application->setBootstrap( string(49),string(9) )
..\Application.php:184
5
0.0136
1026872
Bootstrap->__construct( object(Zend_Application)[1] )
..\Application.php:325
6
0.0226
1345440
Zend_Config_Ini->__construct( string(51),string(5), ??? )
..\Bootstrap.php:13
7
0.0226
1345472
Zend_Config_Ini->_loadIniFile( string(51) )
..\Ini.php:126
8
0.0226
1345472
Zend_Config_Ini->_parseIniFile( string(51) )
..\Ini.php:202
路径错误和路径分隔符错误:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
//启动
function __construct($app){
parent::__construct($app);
file_put_contents("d:/mylog.txt", __FILE__.date('y-m-d h:i:s')."\r\n",FILE_APPEND);
//初始化我们的数据库适配器
$url=constant("APPLICATION_PATH").DIRECTORY_SEPARATOR.'configs'.DIRECTORY_SEPARATOR.'application.ini';
$dbconfig=new Zend_Config_Ini($url,"mysql");
$db=Zend_Db::factory($dbconfig->db);
$db->query('SET NAMES UTF8');
Zend_Db_Table::setDefaultAdapter($db);
}
}
ok..............................................................................................................................................
i am harry
Welcome to the Zend Framework!
This is your project's main page
Helpful Links:
Zend Framework Website |Zend Framework Manual
Zend_Db_Table_Rowset Object( [_data:protected] => Array ( [0] => Array ( [message_id] => 1 [sender] => 张三 [getter] => 李海 [sendtime] => 2012-07-19 14:01:33 [content] => 你好啊,还在吗? ) [1] => Array ( [message_id] => 2 [sender] => 李四 [getter] => 张国荣 [sendtime] => 2012-07-09 14:02:18 [content] => 风继续吹 ) [2] => Array ( [message_id] => 3 [sender] => 回音哥 [getter] => 郭德纲 [sendtime] => 2012-07-26 14:02:39 [content] => 我的歌声里 ) [3] => Array ( [message_id] => 4 [sender] => 李逍遥 [getter] => 大s [sendtime] => 2012-07-26 14:03:25 [content] => 真漂亮 ) [4] => Array ( [message_id] => 5 [sender] => 张柏芝 [getter] => 谢霆锋 [sendtime] => 2012-07-27 14:04:39 [content] => 原谅我吧 ) [5] => Array ( [message_id] => 6 [sender] => 周立波 [getter] => 周瑾 [sendtime] => 2012-07-30 14:05:13 [content] => 你不和我搭档了吗? ) [6] => Array ( [message_id] => 7 [sender] => 李云龙 [getter] => 刘少奇 [sendtime] => 2012-07-17 14:07:08 [content] => 我是华野的 ) [7] => Array ( [message_id] => 8 [sender] => 毛总东 [getter] => 邓小平 [sendtime] => 2012-07-25 14:07:40 [content] => 全心全意为人民服务 ) [8] => Array ( [message_id] => 9 [sender] => 邓小平 [getter] => 江泽民 [sendtime] => 2012-07-25 14:08:10 [content] => 发展是硬道理 ) ) [_table:protected] => Message Object ( [_name:protected] => message [_primary:protected] => Array ( [1] => message_id ) [_definition:protected] => [_definitionConfigName:protected] => [_db:protected] => Zend_Db_Adapter_Pdo_Mysql Object ( [_pdoType:protected] => mysql [_numericDataTypes:protected] => Array ( [0] => 0 [1] => 1 [2] => 2 [INT] => 0 [INTEGER] => 0 [MEDIUMINT] => 0 [SMALLINT] => 0 [TINYINT] => 0 [BIGINT] => 1 [SERIAL] => 1 [DEC] => 2 [DECIMAL] => 2 [DOUBLE] => 2 [DOUBLE PRECISION] => 2 [FIXED] => 2 [FLOAT] => 2 ) [_defaultStmtClass:protected] => Zend_Db_Statement_Pdo [_config:protected] => Array ( [host] => localhost [username] => root [password] => root [dbname] => testzf [charset] => [persistent] => [options] => Array ( [caseFolding] => 0 [autoQuoteIdentifiers] => 1 [fetchMode] => 2 ) [driver_options] => Array ( ) ) [_fetchMode:protected] => 2 [_profiler:protected] => Zend_Db_Profiler Object ( [_queryProfiles:protected] => Array ( ) [_enabled:protected] => [_filterElapsedSecs:protected] => [_filterTypes:protected] => ) [_defaultProfilerClass:protected] => Zend_Db_Profiler [_connection:protected] => PDO Object ( ) [_caseFolding:protected] => 0 [_autoQuoteIdentifiers:protected] => 1 [_allowSerialization:protected] => 1 [_autoReconnectOnUnserialize:protected] => ) [_schema:protected] => [_cols:protected] => Array ( [0] => message_id [1] => sender [2] => getter [3] => sendtime [4] => content ) [_identity:protected] => 1 [_sequence:protected] => 1 [_metadata:protected] => Array ( [message_id] => Array ( [SCHEMA_NAME] => [TABLE_NAME] => message [COLUMN_NAME] => message_id [COLUMN_POSITION] => 1 [DATA_TYPE] => int [DEFAULT] => [NULLABLE] => [LENGTH] => [SCALE] => [PRECISION] => [UNSIGNED] => 1 [PRIMARY] => 1 [PRIMARY_POSITION] => 1 [IDENTITY] => 1 ) [sender] => Array ( [SCHEMA_NAME] => [TABLE_NAME] => message [COLUMN_NAME] => sender [COLUMN_POSITION] => 2 [DATA_TYPE] => varchar [DEFAULT] => [NULLABLE] => [LENGTH] => 64 [SCALE] => [PRECISION] => [UNSIGNED] => [PRIMARY] => [PRIMARY_POSITION] => [IDENTITY] => ) [getter] => Array ( [SCHEMA_NAME] => [TABLE_NAME] => message [COLUMN_NAME] => getter [COLUMN_POSITION] => 3 [DATA_TYPE] => varchar [DEFAULT] => [NULLABLE] => [LENGTH] => 64 [SCALE] => [PRECISION] => [UNSIGNED] => [PRIMARY] => [PRIMARY_POSITION] => [IDENTITY] => ) [sendtime] => Array ( [SCHEMA_NAME] => [TABLE_NAME] => message [COLUMN_NAME] => sendtime [COLUMN_POSITION] => 4 [DATA_TYPE] => datetime [DEFAULT] => [NULLABLE] => [LENGTH] => [SCALE] => [PRECISION] => [UNSIGNED] => [PRIMARY] => [PRIMARY_POSITION] => [IDENTITY] => ) [content] => Array ( [SCHEMA_NAME] => [TABLE_NAME] => message [COLUMN_NAME] => content [COLUMN_POSITION] => 5 [DATA_TYPE] => varchar [DEFAULT] => [NULLABLE] => [LENGTH] => 2000 [SCALE] => [PRECISION] => [UNSIGNED] => [PRIMARY] => [PRIMARY_POSITION] => [IDENTITY] => ) ) [_metadataCache:protected] => [_metadataCacheInClass:protected] => 1 [_rowClass:protected] => Zend_Db_Table_Row [_rowsetClass:protected] => Zend_Db_Table_Rowset [_referenceMap:protected] => Array ( ) [_dependentTables:protected] => Array ( ) [_defaultSource:protected] => defaultNone [_defaultValues:protected] => Array ( ) ) [_connected:protected] => 1 [_tableClass:protected] => Message [_rowClass:protected] => Zend_Db_Table_Row [_pointer:protected] => 0 [_count:protected] => 9 [_rows:protected] => Array ( ) [_stored:protected] => 1 [_readOnly:protected] => )
- zend framework Bootstrap.php数据库适配器配置及错误解决
- 【zendframework_笔记】zend framework bootstrap 初始化数据库适配器
- Zend Framework数据库详细配置
- Zend Framework教程-Bootstrap
- zend framework的Bootstrap.php 可以任意配置文件目录结构
- PHP Zend framework 配置与调试(一)
- PHP Zend framework 配置与调试(二)
- php zend framework框架配置(1)
- zend framework 多语言配置及实例
- Zend Framework 连接 MSSQL数据库遇到的问题及解决过程
- php Zend framework 学习
- zend framework php
- Php Zend framework
- PHP zend framework学习心得
- php/zend framework学习心得
- PHP zend framework学习心得
- Zend Framework 中的 Php 编码标准 (五) - 错误与异常
- Zend Framework 中的 Php 编码标准 (五) - 错误与异常
- linux内核网络协议栈学习笔记(2)
- asp.net 一些常用的处理函数代码
- 抽象类和接口的区别
- 原生JavaScript下的DOM操作
- 《匆匆那年》-第七卷 遇见
- zend framework Bootstrap.php数据库适配器配置及错误解决
- 树形菜单复选框级联选择HTML
- 最近做oracel移植mysql学到的几个mysql知识点()
- linux 根目录存储空间不够
- Qt学习之路(39): QListWidget
- IE无法查看源文件原因及应用技巧
- 虚拟键码
- Add a New Module
- java.io.IOException: Cannot run program "mvn":