User:Hgggdccv
From Thikipedia
Revision as of 20:36, 15 February 2013 by 221.3.153.72 (Talk)
說道:更新postviews plus插件後頁面頂部出現:Warning: preg_match() [function.preg-match]: Compilation failed: nihotng to repeat at offset 問題出在我填寫的機器人(bot)user agent中包含壹些正則的語法,必須要首先轉義,但是作者只是轉義了:/在函數increment_views中,大約460行:$regex = /( . str_replace( /', \/', implode($views_options['botagent'], )|( )) . )/si'; 而我填寫的機器人user agent還有+!.等特殊字符,在使用 preg_match匹配時:$bot = preg_match($regex, $useragent); 就會出現上邊的警告。