LifeType 中文開發論壇

支援 => 安裝與設定 => 主題作者是: Hans 於 九月 20, 2007, 03:46:40 下午



主題: 上傳檔案時出現錯誤訊息
作者: Hans九月 20, 2007, 03:46:40 下午
程式碼:
it's a valid file!
Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\blog\class\data\validator\uploadvalidator.class.php:103) in D:\AppServ\www\blog\class\view\view.class.php on line 321

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\blog\class\data\validator\uploadvalidator.class.php:103) in D:\AppServ\www\blog\class\view\view.class.php on line 321

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\blog\class\data\validator\uploadvalidator.class.php:103) in D:\AppServ\www\blog\class\view\view.class.php on line 321

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\blog\class\data\validator\uploadvalidator.class.php:103) in D:\AppServ\www\blog\class\view\view.class.php on line 321

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\blog\class\data\validator\uploadvalidator.class.php:103) in D:\AppServ\www\blog\class\view\view.class.php on line 321

Warning: Cannot modify header information - headers already sent by (output started at D:\AppServ\www\blog\class\data\validator\uploadvalidator.class.php:103) in D:\AppServ\www\blog\class\view\view.class.php on line 175

我知道這個是BOM的問題
所以我用ConvertZ (http://alf-li.pcdiscuss.com/c_convertz.html")把所有的檔案都轉過
結果還是一樣,囧

剛剛不信邪,直接到官網抓了一份新的檔案 版本1.2.4
在一台新的Windows XP上,裝上 Appserv 2.5.9 然後裝上LT 1.2.4
只做過允許上傳的副檔名設定,然後再上傳一次,囧

還是出現一樣的問題
請問這是bug嗎?


主題: Re: 上傳檔案時出現錯誤訊息
作者: Hans九月 26, 2007, 10:55:51 上午
請問這個問題有人可以回答嗎?


主題: Re: 上傳檔案時出現錯誤訊息
作者: Hans十月 02, 2007, 10:50:38 上午
open LTRoot/class/data/validator/uploadvalidator.class.php
find 第103行

程式碼:
            // check if the filename extension is one of the allowed ones or not
            $fileName = basename($upload->getFileName());
            foreach( explode( " ", $allowedFilesStr ) as $file ) {
            if( Glob::myFnmatch( $file, $fileName )) {
//print("it's a valid file!");  <= 第 103行
                return true;
將這行註解掉後問題即解決
應該是在寫程式時不小時留下的bug吧!!
XD