技術系のよくある質問を網羅、作業上で必要となる文書資料を提供中
ドキュメントセンター テックナレッジ

HOME > コンテンツ制作 > プログラム > PHP 

Zend_Config_Iniでiniファイルの読み込みでsub-keyに関する不具合が出ますが? 

[ 一覧へ戻る ]

文字列に注意します。

「.」を複数はさんで「test.test.test」のような文字列を指定することはできますが、「test.test」と「test.test.test」という文字列を同時使用することはできません。

不具合の例

common.table=/php/common/table.php
common.table.edit=/php/common/table-edit.php

修正例

common.table.index=/php/common/table.php
common.table.edit=/php/common/table-edit.php

不具合の例

Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'Cannot create sub-key for 'table' as key already exists' in /usr/home/base/framework/library/Zend/Config/Ini.php:170 Stack trace: #0 /usr/home/base/framework/library/Zend/Config/Ini.php(172): Zend_Config_Ini->_processKey(Array, 'table.edit', '/php/common/tab...') #1 /usr/home/base/framework/library/Zend/Config/Ini.php(145): Zend_Config_Ini->_processKey(Array, 'common.table.ed...', '/php/common/tab...') #2 /usr/home/base/framework/library/Zend/Config/Ini.php(115): Zend_Config_Ini->_processExtends(Array, 'global') #3 /usr/home/beta/settings/init/global.php(6): Zend_Config_Ini->__construct('/home/beta/sett...', 'global') #4 /usr/home/beta/test03/information/index.php(1): require_once('/usr/home/beta/...') #5 {main} thrown in /usr/home/base/framework/library/Zend/Config/Ini.php on line 170


公開日: 2007年04月16日   / 文書番号: 007743 / カテゴリ: PHP / 閲覧数: 1017 




ドキュメントセンター テックナレッジ
Copyright 1997-2008 generationact. all rights reserved.