<?php
echo preg_replace("/[^\/\-\w\.\\]/", '', 'dd\\\/dd');
提示出错
Warning: preg_replace() [function.preg-replace]: Compilation failed: missing terminating ] for character class at offset 12 in G:\www\test\index.php on line 2
<?php
echo preg_replace("/[^\/\-\w\.\\\]/", '', 'dd\\\/dd');
dd\\/dd
<?php
echo preg_replace("/[^\/\-\w\.\\\\]/", '', 'dd\\\/dd');
dd\\/dd
好像是挨消耗掉一条