<?php$txt = "<log>abc</log>";
preg_match('/<log>.*?</log>/', $txt, $matches);?>运行后报错: Warning: preg_match() [function.preg-match]: Unknown modifier 'l' in test.php为什么呢?
preg_match('/<log>.*?</log>/', $txt, $matches);?>运行后报错: Warning: preg_match() [function.preg-match]: Unknown modifier 'l' in test.php为什么呢?
preg_match('/<log>.*?<\/log>/', $txt, $matches);/ 这个要转义
preg_match('/<log>.*?<\/log>/', $txt, $matches);echo $matches[0];?>为什么不是 <log>abc</log> 而是 abc 呢?