簡體   English   中英

PHP parse_ini_file在WINDOWS PHP 5.3.0中帶有斜線

[英]PHP parse_ini_file with slashes in WINDOWS PHP 5.3.0

我使用的是Wiki軟件:dokuwiki,並且由於安裝了模板: http : //www.dokuwiki.org/template :monobook

在Windows 7 64bit上使用WAMP進行本地測試時,出現了此錯誤:Apache:2.2.11
的PHP:5.3.0

更新我已經將PHP版本升級到5.3.1,這已經修復了錯誤。

警告 :用C解析錯誤:\\瓦帕\\ WWW \\維基\\ lib中\\ EXE /../../ LIB / TPL /的MonoBook / style.ini在C30:\\瓦帕\\ WWW \\維基\\ lib中\\ EXE \\54行的css.php
警告 :第55行的C:\\ wamp \\ www \\ wiki \\ lib \\ exe \\ css.php中為foreach()提供的參數無效

style.ini

; INI to handle loading of the CSS files of the "monobook" template for DokuWiki
;
;
; LICENSE: This file is open source software (OSS) and may be copied under
;          certain conditions. See COPYING file for details or try to contact
;          the author(s) of this file in doubt.
;
; @license GPLv2 (http://www.gnu.org/licenses/gpl2.html)
; @author Andreas Haerter <development@andreas-haerter.com>
; @link http://andreas-haerter.com/projects/dokuwiki-template-monobook
; @link http://www.dokuwiki.org/template:monobook
; @link http://www.dokuwiki.org/devel:css#styleini



; Please see http://www.php.net/manual/en/function.parse-ini-file.php
; for limitations of the ini format used here

; Define the stylesheets your template uses here. The second value
; defines for which output media the style should be loaded. Currently
; print, screen and rtl are supported. rtl styles are loaded additionally
; to screen styles if a right-to-left language is selected (eg. hebrew)
[stylesheets]

; screen
; note to myself: don't forget to respect the workaround within "bug49642.php"
;                 when adding new screen styles.
; load the DokuWiki styles. See <http://j.mp/eq8zSo> why I am doing this.
[line:30] static/3rd/dokuwiki/_imgdetail.css        = screen
static/3rd/dokuwiki/_media_popup.css      = screen
static/3rd/dokuwiki/_media_fullscreen.css = screen
static/3rd/dokuwiki/_fileuploader.css     = screen
static/3rd/dokuwiki/_tabs.css             = screen
static/3rd/dokuwiki/_links.css            = screen
static/3rd/dokuwiki/_toc.css              = screen
static/3rd/dokuwiki/_footnotes.css        = screen
static/3rd/dokuwiki/_search.css           = screen
static/3rd/dokuwiki/_recent.css           = screen
static/3rd/dokuwiki/_diff.css             = screen
static/3rd/dokuwiki/_edit.css             = screen
static/3rd/dokuwiki/_modal.css            = screen
static/3rd/dokuwiki/_forms.css            = screen
static/3rd/dokuwiki/_admin.css            = screen

; load the most important MediaWiki monobook styles
static/3rd/monobook/main.css = screen

; load the specific "monobook for dokuwiki" styles
static/css/screen.css = screen
user/screen.css       = screen

這是css.php中的PHP代碼,用於加載ini文件:

// load template styles
$tplstyles = array();
if(@file_exists($tplinc.'style.ini')){
    $ini = parse_ini_file($tplinc.'style.ini',true);
    foreach($ini['stylesheets'] as $file => $mode){
        $tplstyles[$mode][$tplinc.$file] = $tpldir;
    }
}

這確實僅是PHP 5.3.0中的已知錯誤。 參見https://bugs.php.net/bug.php?id=49692

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM