php程式码1:
<?
$PathString = 'C:\AppServ\www\test';
print preg_replace('/e/','',$PathString);
?>
结果:
C:\AppSrv\www\tst
php程式码2:
<?
$PathString = 'C:\AppServ\www\test';
print preg_replace('/\/','',$PathString);
?>
结果:
Warning: preg_replace() [function.preg-replace]: No ending delimiter '/' found
预期结果:
C:AppServwwwtest
如果想得到[预期结果],反斜线取代掉,那么[php程式码2]应该怎么改呢?