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嗎?
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