看板 Wikipedia 關於我們 聯絡資訊
※ [本文轉錄自 PHP 看板] 作者: slasher (you got me) 看板: PHP 標題: [請益] 裝dokuwiki出現錯誤preg_replace 時間: Fri Mar 2 09:27:30 2007 Warning: preg_replace() [function.preg-replace]: Compilation failed: lookbehind assertion is not fixed length at offset 5 in /***/confutils.php on line 151 144 function confToHash($file,$lower=false) { 145 $conf = array(); 146 $lines = @file( $file ); 147 if ( !$lines ) return $conf; 148 149 foreach ( $lines as $line ) { 150 //ignore comments 151 $line = preg_replace('/(?<!&#.*$/','',$line); 152 $line = trim($line); 153 if(empty($line)) continue; 154 $line = preg_split('/\s+/',$line,2); 155 // Build the associative array 156 if($lower){ 157 $conf[strtolower($line[0])] = $line[1]; 158 }else{ 159 $conf[$line[0]] = $line[1]; 160 } 161 } 162 163 return $conf; 164 } 看不懂這個warning是什麼意思 而且對php不太熟悉^^"但會一些基本程式語言 照著dokuwiki的安裝說明跑 之前也有出現過這個問題 我把整個目錄砍掉 重新安裝,設定權限等等...就可以了 這次砍掉再重新安裝也沒用,一安裝完就出現錯誤訊息... 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.15.169 ※ 編輯: slasher 來自: 61.229.15.169 (03/02 09:41)
LPH66:把(改成\(試試 ()這兩字是括起一段供後面以\1等參考 03/02 12:58
LPH66:或是範圍指定 03/02 12:59
LPH66:不過像你這種情形 要的應該不只是這個 03/02 13:00
LPH66:看了一下 改用字元組會比較好: '/[(?<!&#.*$]/' 03/02 13:00
LPH66:當然這是不是原先dokuwiki就這樣寫就不知道了 03/02 13:00
-- █◢◣◣ ● ◢█◢█ ● ◢██◣ ████ ▅◣ ███◤ ▅◣ █◤◢█ ◢██◣ ◢██◣ ◢◣◢◣ ████ ██ ███◣ ██ █◢██ ███◤ ██ █ ████ ◥◤◥◤ █◤ ◥█◥◤ █◤ ◥█◤◤ ★ ███◢ ██◣█ ████ http://0rz.net/e31rR ◥██◤ ◥██◤ █◥◤◥   歡迎免費申請Wiki站 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.167.101.90