作者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)
1F:→ LPH66:把(改成\(试试 ()这两字是括起一段供後面以\1等参考 03/02 12:58
2F:→ LPH66:或是范围指定 03/02 12:59
3F:→ LPH66:不过像你这种情形 要的应该不只是这个 03/02 13:00
4F:→ LPH66:看了一下 改用字元组会比较好: '/[(?<!&#.*$]/' 03/02 13:00
5F:→ LPH66:当然这是不是原先dokuwiki就这样写就不知道了 03/02 13:00